On Sat, Dec 6, 2008 at 2:39 PM, Michael Day <[EMAIL PROTECTED]> wrote:
> Personally I would prefer to have return statements in lambdas as well.
>From what I understand, if lambdas are supposed obey Tenent's
principle, then they cannot have a return statement/expression.
Wrapping an expression in a lambda must not change the meaning of the
program. the following would need to be equivalent.
exp
lambda () {exp;}
If a return was required in a lambda then the following would not be equivalent
function() {
return 2;
return 1;
}
function() {
lambda() {return 2;}
return 1;
}
The first function would return 2 and the second would return 1.
That is my understanding anyway.
Peter
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss