sub make-adder ($a){
sub ($b) {
$a + b$;
}
}
make-adder 5
returns a closure, however pugs won't parse:
make-adder 5 6
or:
(make-adder 5) 6
I have to resort to:
(make-adder 5)(6)
Is this correct behavior?
Thanks,
Matt
--
"You do not really understand something unless you can explain it to your grandmother." — Albert Einstein.
I think it's the correct behaviour, yes. We are not currying
by default, unlike a certain Other Language... :-)
Thanks,
/Autrijus/