
18 Jan
2007
18 Jan
'07
5:41 a.m.
phiroc@free.fr skrev:
Hello,
what is so great about "currying"?
What are its uses, apart from letting one define functions with less parentheses?
Letting one apply them with less extra characters: add x y = x + y map (add 2) [1..5] instead of add (x,y) = x + y let add2 y = add(2,y) in map add2 [1..5] end (The last might not technically be partial application, but it serves the same purpose without using currying.) I believe it makes code shorter and more readable, but I do not believe it gives more power. / johan