May 24-26 rough meeting notes

Brendan Eich brendan at mozilla.com
Fri May 27 10:12:08 PDT 2011


This example was all about return in block-lambda returning from enclosing function (the function f). That's all. Yeah, it was not useful code ;-).

/be

On May 27, 2011, at 9:42 AM, Rick Waldron wrote:

> I have no intention of bike-shedding, but the following example keeps popping up:
>  
> Arrow Function/Block:
> function f() {
>   a.forEach({| | return 3});
> }
> 
> ...And I wonder if forEach was _only_ used to illustrate an example of the block lambda syntax? If this was meant to serve as an actual representation of a real world use case, I would be negligent if I didn't speak up and note that the use of "a.forEach({| | return 3});" is incorrect. a.forEach( callback ) returns undefined per spec.
> 
> Forgive me if I've misunderstood the use of "forEach" in this example.
> 
> Rick
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110527/c3ad0440/attachment.html>


More information about the es-discuss mailing list