[Haskell-cafe] Currying

Yitzchak Gale gale at sefer.org
Thu Jan 18 07:39:21 EST 2007


Hi,

Phiroc wrote:
>> what is so great about "currying"?
>> What are its uses, apart from letting one define functions with less
>> parentheses?

Chris Eidhof wrote:
> it's just really handy. It saves you a lot of tedious typing

I agree. But I think there is more to it than that.

Currying is more than just a way to make it easier
to convert a function into a different function with a
different number of parameters. The original function
is *already* a function of any number of its parameters
that you want, all at once. That way of thinking gives
you a lot of power, while preserving compile-time
type safety and crystal-clear readability.

I think this is one of the ingredients that contribute to
the gestalt "wow" feeling that many beginners experience
when they first "get it" in Haskell - a sudden exhilarating,
liberating feeling of expressiveness.

Regards,
Yitz


More information about the Haskell-Cafe mailing list