Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Chapter 5, I briefly
pointed out a library named prelude.ls
that provides a number of functions that allow you to write web-centric,
client-side code with a more functional style. Underscore.js was written by the same person who
created CoffeeScript and it has a similar goal as prelude.ls, but with more features (not all of
which are specifically targeted at a functional style).
The Underscore.js site contains a large number of examples, so I will only provide a quick, high-level list of features:
Collection-related functions include map, reduce, filter, all, any,
sortBy, and groupBy.
Array-related functions include first, last, union, intersect, flatten, and zip.
Helper functions include bind, memoize, throttle, and once.