News for hackers. Stuff that matters.
Re:Curried Javascript Functions by ilyak on Sunday July 19, 2009 @11:55PM (#713913)
Prototype has curry() and bind() methods on functions for some time.

http://prototypejs.org/api/function

String.prototype.splitOnSpaces = String.prototype.split.curry(" "); "foo bar baz thud".splitOnSpaces(); //-> ["foo", "bar", "baz", "thud"]

Re:Curried Javascript Functions by lhorie on Monday July 20, 2009 @09:21AM (#714357)
This:

  "foo bar baz thud".splitOnSpaces(); //-> ["foo", "bar", "baz", "thud"]
can be written like this:

  $w("foo bar baz thud")