Function Application is not Currying
kkylheku at gmail.com
Thu Jan 29 02:49:25 CET 2009
On 2009-01-28, Xah Lee <xahlee at gmail.com> wrote:
> Function Application is not Currying
That's correct, Xah. Currying is a special case of function application.
A currying function is applied to some other function, and returns function
that has fewer arguments.
In some languages, you don't see the currying function. It's invisibly
performed whenever you forget an argument. Hit a three argument function with
only two arguments, and you don't get a nice ``insufficient arguments in
function call'' error, but the call is diverted to the currying function, which
gives you back a function of one argument, which you can then call with the
missing argument to compute the original function.
> Xah Lee, 2009-01-28
> In Jon Harrop's book Ocaml for Scientist at
Figures you'd be reading this. Learning anything?
> It says:
> A curried function is a function which returns a function as its
> LOL. That is incorrect.
Yawn. Say it isn't so.
More information about the Python-list