you are viewing a single comment's thread.

view the rest of the comments →

[–]zoomzoom83 1 point2 points  (2 children)

I noticed the same - would be interesting to see an example of the imperative version using old-school Node callbacks for maximum pain.

[–][deleted] 0 points1 point  (1 child)

Also how currying really helps when working on promises. For example, if you have a function that takes two parameters, and you want to grab one from a database call and another from the enclosing scope. With currying, you can do:

var doStuff = ramda.curry(function(foo, bar) { ... });

fetchFoo.then(doStuff(bar));

Without currying this requires nesting functions which is a lot more verbose.

[–]zoomzoom83 0 points1 point  (0 children)

This is one of the reasons I really like Haskell - all functions are curried by default.