Optional brackets around lambda expression

Bob Foster bobfoster at gmail.com
Fri Jun 17 07:48:54 PDT 2011


Maurizio Cimadamore wrote:
>
> Of course you can lookahead; but certain expressions, as pointed out
> will remain ambiguous:
>
> process(x, y, z, a, b, c, d ->  a);

Assuming parenthesis are required for multiple arguments and optional for
single arguments, the example has only one parse, equivalent to:

process(x, y, z, a, b, c, (d) -> a);

Bob


More information about the lambda-dev mailing list