Yeah, it is a bit awkward. After reading this article a few years back, I wrote a simpler implementation of curry that transforms the function itself, rather than being called from within it, e.g.
var add = curry(function(a,b,c) { return a + b + c; });
Comments
Yeah, it is a bit awkward. After reading this article a few years back, I wrote a simpler implementation of curry that transforms the function itself, rather than being called from within it, e.g.
You can find the code at http://ianhenderson.org/curry.js if you're interested.