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.
