2011-01-07

Underscore.js javascript Library for functional programing

“Underscore.js” is a javascript library that provides a set of functional programing functions. It saves you time writing them or writing massive number of lines in imperative way such as loops, etc.

For example, it has these functions on lists: map, reduce, select, max, min, sortBy, sortedIndex, first, rest, last, compact, flatten, without, uniq, intersect, indexOf, lastIndexOf, range.

Pretty simple to use. Home page at: http://documentcloud.github.com/underscore/

See also: Functional Programing in Javascript.