[Python-Dev] PEP 309, function currying

Andrew Koenig ark-mlist at att.net
Sat Feb 21 14:29:53 EST 2004


> The first Google result I found that mentioned function currying was this:
> [ http://www.engr.uconn.edu/~jeffm/Papers/curry.html ] Function Currying
> in Scheme

I should have read the paper itself before commenting on it, because the
paper uses the term correctly.

> I'll quote from the abstract:
>    Function currying is the process of partially, or incrementally,
> supplying arguments to a function.  Curried functions are delayed
> functions expecting the remainder of the arguments to be supplied.
> Once all the arguments are supplied, the function evaluates normally.

Unfortunately, the abstract *does not* use the term correctly :-)
More accurately, the abstract uses the term twice: once correctly,
once incorrectly.

Here's what the abstract should say:

Function currying is the process of transforming a function that expects all
of its arguments at once into a delayed function (called a curried function)
that expects the remainder of the arguments to be supplied.  Once all the
arguments are supplied, the function evaluates normally.

This revised abstract is consistent with the usage of the term "curried
functions" in section 1 of the paper.  Moreover, it is also consistent with
the way in which the function "curry" behaves in section 3.





More information about the Python-Dev mailing list