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
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to