Here is a great functional JavaScript library if you don't want to build it up yourself:<p><a href="http://osteele.com/sources/javascript/functional/" rel="nofollow">http://osteele.com/sources/javascript/functional/</a>
Suggestion:<p>instead of this:<p><code>
function add (a,b,c){
if (arguments.length < this.add.length) {
return curry(this.add,arguments,this);
}
return a+b+c;
}
</code><p>we could have something like:<p><code>
function add (a,b,c) {
return curry(arguments, 3, function (x,y,z) {
return a+b+c;
};
}
</code><p>which is arguably simpler and cleaner. However, one extra closure is used.. maybe it makes it more complicated for some?<p>But, overall, pretty clear and interesting article :o