Good point, the Identifier + ArrowFormalParameters would be ambiguous
with a function call. That could be fixed though by just putting the
Identifier before the Arrow:
higher( fact -> (n) n<=1 ? 1 : n * fact(n-1));
var warmer -> (a) {...};
let warm -> (b) {...};
const colder -> (c) {...};
const #coldest -> (d) {...};
On Wed, Jun 1, 2011 at 11:15 AM, Allen Wirfs-Brock
<[email protected]> wrote:
> one thing that stands out in your proposal is that there doesn't appear to be
> any way to write a recursive arrow function.
>
> Here is one way it might be done:
>
> higher(->: fact (n) n<=1?1:n*fact(n-1));
>
> or possibly
>
> higher(->@ fact (n) n<=1?1:n*fact(n-1));
>
> (in either case the 3 character arrow sequence would be one token)
>
>
Thanks,
Sean Eagan
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss