Currying

At 04:26 PM 5/24/01 -0500, pat hayes wrote:
>Eg using functions, one encodes an n-ary function - whichis 
>interchangeable with an n-ary sequence at this level of abstraction -  as 
>a single-argument function whose value is an (n-1)-argument function (a 
>trick invented by a logician called Curry, and hence known as currying.)

Hmmm... I thought Currying worked the other way round:

If 'foo' is a 2-argument function used as
   (foo a b)
then 'foo a' is a one argument function, such that
   ((foo a) b)
is equivalent to
   (foo a b)
so this kind of "partial function evaluation" is left-associative.

What you describe sounds to me like a right-association;  in truth I can't 
figure the (n-1) argument function as an argument to the n-argument function.

#g


------------
Graham Klyne
GK@NineByNine.org

Received on Friday, 25 May 2001 12:22:56 UTC