In many list processing languages (and other languages as well) they have a function called curry, which does some neat things. My question is why do they call it curry? Where does this name come from? My only guess would be the tasty curry dishes from various countries in the world but I can't see any relation with this and the functions behaviour.
Asked
Active
Viewed 1,804 times
20
-
6Hint: the programming language Haskell is named after someone named Haskell Curry. – Alexis King Apr 13 '15 at 20:40
-
16Because *Schönfinkeln* caused problems with english speakers **;)** (see [Moses Schönfinkel](https://en.wikipedia.org/wiki/Moses_Sch%C3%B6nfinkel)) – Random Dev Apr 13 '15 at 20:40
-
1Note also that there exist also a functional logic language called [Curry](https://en.wikipedia.org/wiki/Curry_%28programming_language%29) which, by the way, uses Haskell syntax. – Bakuriu Nov 02 '15 at 21:41
2 Answers
30
It's named after Haskell Curry, who worked on the mathematical foundations of functional programming.

SLaks
- 868,454
- 176
- 1,908
- 1,964
8
The concept itself is named after Haskell Curry, who developed it.
Currying is basically translating a function of N arguments to a 'tree' of N nested functions, each taking one argument.
In Haskell, the curry
function converts a function of two arguments to a function of one argument that returns another function of one argument, which will finally return the result. It has the type:
curry :: ((a, b) -> c) -> a -> b -> c
Its implementation is shorter than the type definition:
curry f x y = f (x, y)

MisterMetaphor
- 5,900
- 3
- 24
- 31