Named Arrow Functions

Kevin Smith zenparsing at gmail.com
Wed Aug 12 01:35:18 UTC 2015


>
>     x.map(factorial(x) => do {
>         if (x <= 1) {
>             1;
>         } else {
>             x * factorial(x - 1)
>         }
>     });
>

This has been discussed over the years but there has been very little
interest in making the grammar more complicated.  After all, you can always
just assign the arrow function to a locally-scoped variable.  And as Daniel
pointed out, this suggestion actually conflicts with async arrow functions.

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150812/4950ecca/attachment-0001.html>


More information about the es-discuss mailing list