Ceylon language
Pelle
pelle.mansson at gmail.com
Fri Apr 15 07:27:14 PDT 2011
On 04/15/2011 03:23 AM, Nick Sabalausky wrote:
> I'm not certain either, but I *think* partial application is just like
> currying except there's some sort of arbitrary limitaion on what
> combination(s) of paramaters you can choose to specify or not specify. And
> that limitation is based purely on what order the function defines its
> parameters. So basically, my understanding is that partial application is an
> arbitrarily-gimped currying.
In my understanding they are, while related, distinct like so:
int foo(int x, int y, int z);
int delegate(int, int) p = partiallyApply(&foo, 3);
int delegate(int) delegate(int) delegate(int) c = curry(&foo);
assert (p(4,5) == foo(3,4,5));
assert (c(3)(4)(5) == foo(3,4,5));
More information about the Digitalmars-d
mailing list