
* Peter Verswyvelen
On Thu, Sep 10, 2009 at 11:47 AM, Roman Cheplyaka
wrote: step x g a = g (f a x)
is, thanks to currying, another way to write
step x g = \a -> g (f a x)
I thought currying just meant
curry f x y = f (x,y)
Here you use 'currying' meaning the process of applying the 'curry' operation, i.e. transforming 'uncurried' function to a 'curried' one. (BTW, Wikipedia agrees with you.)
Isn't the reason that
f x y z = body
is the same as
f = \x -> \y -> \z -> body
just cause the former is syntactic sugar of the latter?
Technically, yes. Generally speaking, currying is the idea of interchangeability of the function which takes several arguments and the function which returns another function (i.e. what is used here). -- Roman I. Cheplyaka :: http://ro-che.info/ "Don't let school get in the way of your education." - Mark Twain