Currying is a method of creating functions with one or several pre-defined arguments. The essence of currying is simple: to take a function of any arity (number of expected arguments) and make it into a unary function. JavaScript’s syntax doesn’t lend itself well to such functions, which is why, when it comes to JavaScript, implementations of the curry function tend to be less strict and allow to pass several arguments.
Tags
Join Hacker Noon
Create your free account to unlock your custom reading experience.
Сurrying 101: A Quick Guide for JavaScript Devs
Source: Trends Pinoy
0 Comments