News for hackers. Stuff that matters.
Re:Currying by kazinator on Monday April 08, 2024 @01:13AM (#39966408)
> Currying is a subset of partial application

No, it isn't; it's a different operation.

Currying refers to building (effectively) functions of multiple arguments out of only one argument functions (such as in a language that has only those).

A curried function is not understood to have been applied, partially or otherwise; none of its arguments have been bound to values, thereby reducing its arity.

Partial application is an operation that requires one or more arguments. Currying does not require arguments; rather, the result of currying requires arguments (all of them).

There is a sort of partial application (effectively) going on when the curried function is applied to the arguments, which has to be done one argument at a time through the chain. At each step, one more argument is bound, and fewer remain.

There are no comments on this comment yet.