currying
- noun
- /ˈkɜːriɪŋ/
- Specialized
- Among other things, Objective-C lets you do function currying, adding and removing methods from classes at runtime, and reflection.
Examples
-
Using currying, we can create a function that takes multiple arguments one at a time.
-
This is also called currying or schnfinkeling.
Blog text (18) -
This is without considering the fun to be had with type inference, contravariance, currying, and the like.
Blog text (7) -
In functional programming, currying allows developers to create functions with easier-to-manage parameters.
-
Libraries like Lodash provide support for currying, making it easier to compose functions.
Surface Forms
Morphology
currying = curry (opaque) = curry + ing
The term 'currying' in programming is not transparently derived from the culinary term 'curry'.
Etymology
Currying in programming is named after the logician Haskell Curry, and it describes turning a function that needs many values into a chain of small functions that each take one value, like giving ingredients one by one. So, the name helps you remember that currying is about 'breaking a job into single steps'.