documentcloud/underscore — pull request #500 by bryanwoods (2012-03-05 17:50:40+00:00)
Title: Aliases `_.take()` to `_.first()` and `_.head()`

Although I understand that adding a third name for the same function is pushing the limits of going overboard, I've aliased `_.take()` to `_.first()` and `_.head()` in order to gain some convenience via consistency with other languages.

The following examples all return `[1, 2, 3]`:

Haskell:
take 3 [1..10]

Ruby:
1.upto(10).take(3)

Clojure:
(take 3 (range 1 11))

And now JavaScript with Underscore.js:
var arr = _.range(1, 11);
_(arr).take(3);