[EMAIL PROTECTED] 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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to