Javascript – Curry Functions

Wikipedia has the following to say about currying:

In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple of arguments) into evaluating a sequence of functions, each with a single argument. Currying is related to, but not the same as, partial application.

Instead of putting multiple arguments in one function, I call a function multiple times, passing in one argument each time.  I have done three different versions using normal formatting, and fat arrows.


Leave a Reply

Your email address will not be published.