Haskell confusion (81)

5 Name: 1,3 2005-11-05 05:03 ID:B+nCC/mJ

I thought the wikipedia article was fairly easy to follow:

http://en.wikipedia.org/wiki/Currying

It's like, you want to have a function that takes two arguments, say, plus(2,4) = 6. But instead of doing it that way, you have plus(2) return a function that adds 2 to its argument, so you do (plus(2))(4) and that equals 6.

I guess you already have to be cool with the idea that functions can return functions. That was something I already understood from playing with Scheme. But other than that, currying seems a pretty straightforward concept.

What isn't straightforward is the pros and cons of currying in practice, which is why I'm interested in what >>2 has to say about the latter.

This thread has been closed. You cannot post in this thread any longer.