Re:Currying in JavaScript
by Zalastax on Sunday July 19, 2015 @06:45PM
(#9913145)
In what way is it better than partial() from rambda or underscore? I have tried to see the potential in currying but gave up when I couldn't create a function with no parameters without calling it.
[ Parent
| on HN ]
Why did you think you needed it in the case where you had a function that didn't need parameters? That sort of relinquishes the point of currying. (Should just be passing the function itself)
I had a function taking parameters and wanted a function without parameters. Using this style the function would be called immediately when all parameters are supplied, instead of in the callback as I intended.
Ahh, I see what you meant. That should work with a correct currying implementation for sure