Jump to content

Currying

From Simple English Wikipedia, the free encyclopedia

Currying is a technique used in mathematics and computer science that consists of changing a function that takes several arguments into a number of functions that each take one argument. Mathematicians Moses Schönfinkel[1][2][3] and Gottlob Frege laid the groundwork for this technique, which is named after Haskell Brooks Curry.[4][5] Currying is used in Lambda calculus. Some programming languages, such as ML and Haskell say that functions can only have one argument.

References

[change | change source]
  1. Strachey, Christopher (2000). "Fundamental Concepts in Programming Languages". Higher-Order and Symbolic Computation. 13: 11–49. doi:10.1023/A:1010000313106. S2CID 14124601. There is a device originated by Schönfinkel, for reducing operators with several operands to the successive application of single operand operators. (Reprinted lecture notes from 1967.)
  2. Reynolds, John C. (1998). "Definitional Interpreters for Higher-Order Programming Languages". Higher-Order and Symbolic Computation. 11 (4): 374. doi:10.1023/A:1010027404223. S2CID 43352033. In the last line we have used a trick called Currying (after the logician H. Curry) to solve the problem of introducing a binary operation into a language where all functions must accept a single argument. (The referee comments that although "Currying" is tastier, "Schönfinkeling" might be more accurate.)
  3. Kenneth Slonneger and Barry L. Kurtz. Formal Syntax and Semantics of Programming Languages. p. 144.
  4. Henk Barendregt, Erik Barendsen, "Introduction to Lambda Calculus[permanent dead link]", March 2000, page 8.
  5. Curry, Haskell; Feys, Robert (1958). Combinatory logic. Vol. I (2 ed.). Amsterdam, Netherlands: North-Holland Publishing Company.