3 ms·
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 w
by Zalastax 11y ago
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.
- amalcon 11y agoIt isn't better; it's the same thing less a few minor details. _.partial is a from of currying. It's just a matter of which syntax you prefer.
- bpicolo 11y agoWhy 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)
- Zalastax 11y agoI 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.
- bpicolo 11y agoAhh, I see what you meant. That should work with a correct currying implementation for sure