Why should programmers care about currying in practice in Scheme?

I wanted to know what currying means in practice for programmers who are not themselves theoretical computer scientists so I asked about it here. There were a lot of informative replies; and the most direct answers to the question seem to be:

Anthony Cowley:

There are many cases where Curried functions can be convenient, but I’ll just pick one class of examples. In FP, one is often passing around bundles of state in the form of parameters to a function.

Joe Marshall:

Your best bet would be to look at existing Scheme code. I found this example in the MIT Scheme loader: [click link for code]

Richard Cleis:

Currying permits repeated use of intermediate functions as an alternative to overtly managing arguments to a core function.

David Van Horn [on how to use the state monad in Scheme]:

You might have a look at these:

http://groups.google.com/group/comp.lang.functional/msg/2fde5545c6657c81
http://okmij.org/ftp/Scheme/monad-in-Scheme.html


Leave a Reply

Your email address will not be published. Required fields are marked *