Currying
Noun · Development
Definitions
Transforming a function that takes several arguments into a chain of functions that each take one, so f(a, b, c) becomes f(a)(b)(c). Each call returns a new function waiting for the next argument until all have been supplied. The technique is named after the logician Haskell Curry, although Moses Schönfinkel and Gottlob Frege described it earlier. It follows naturally from the lambda calculus, in which every function takes exactly one argument. In Haskell and ML-family languages all functions are curried by default, so add 1 is itself a function that adds one, which makes composing and passing specialised functions concise. Currying is often confused with partial application: currying restructures a function into single-argument steps, while partial application fixes some arguments of any function and returns one taking the rest. In JavaScript and Python currying is done by hand or through utility libraries, and it is common in functional-style code that builds pipelines of small functions.
In plain English: Breaking a function that needs several inputs into a chain of functions that each take one input at a time, like an assembly line where each worker adds one part.