[plt-scheme] Why do layman programmers care about Currying?

From: Grant Rettke (grettke at acm.org)
Date: Fri Jan 2 09:57:35 EST 2009

On Tue, Dec 30, 2008 at 11:44 PM, Richard Cleis <rcleis at me.com> wrote:
> On Dec 30, 2008, at 9:12 PM, Grant Rettke wrote:
>> Why do layman (working programmers) care about Currying? Or how are
>> they applied in daily use to help one out?
> I'm not sure if you are referring to 'using a function that curries other
> functions,' or if you mean (as the wikisnip says) "if you fix some
> arguments, you get a function of the remaining arguments." I manually do the
> latter frequently, and it's one of the reasons I like Scheme so much.

I don't understand the practical application of currying in Scheme, so
I'm not asking about one or the other; the wikipedia link was just my
going in position on trying to understand what is currying.

When you do apply the latter, what are the idioms or patterns that you
most often encounter?

I understand the idea of using bindings to capture state, but I don't
see how that translates into normal usage. For example, if you write

(define (((foo a) b) c)
  (λ () (do-something-to a b c)))

you will get a function back 3 times, but only the third time is the
result you expect. How do you know when to stop, keep track of how
many times you called it? Is this a good example?

Posted on the users mailing list.