liveBook · Manning

Functions as data

As explained in Functional Programming in JavaScript

A programming view in which functions are treated as representational artifacts for expressing queries or transformations.

Treat functions such as map, filter, reduce, groupBy, sortBy, and uniq as a vocabulary for describing what data should become. This makes array transformations resemble a query language such as SQL. section 3.4

From sequential steps to a query

A functional chain states the operations directly: _.chain(names).filter(isValid).map(s => s.replace(/_/, ' ')).uniq().map(_.startCase).sort().value(). The result is a sorted list of cleaned, unique names.

Lazy chains define the pipeline before evaluating it, making data flow visible and allowing optimizations such as data-structure reuse and method fusion.

How Functional Programming in JavaScript covers it

How deep it goes
Explains chained transformations and lazy evaluation, while deferring detailed performance treatment.
Examples
Demonstrates name cleanup, person-list queries, country statistics, and SQL-style selection with Lodash chains.
What you can do after
Apply it via Lodash to compose readable, declarative data pipelines and SQL-like queries.
How it connects
Connects higher-order functions, array operations, lazy evaluation, data flow, Lodash, and SQL.

This explainer was generated by Manning's knowledge graph from the text of Functional Programming in JavaScript. The section links point to the parts of the book it draws on.