Hacker News new | past | comments | ask | show | jobs | submit login

This is a very cool intro to the new features of JS! Thanks! :-)

What part here is Currying?




The currying part is the variable that you give to the first function. In the first function the prefix variable is stored in the local scope of the big arrow function that is returned. This ability of functions to remember variables from the scope in which they were created is called closures, and storing a variable like this is a closure. Using closures to generate functions with preset variables is currying.




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

Search: