Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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


It 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: