Building Lambda and a Closure Question

Tomasz Kowalczewski tomasz.kowalczewski at gmail.com
Sun Nov 20 10:36:37 PST 2011


Hi,

On Sun, Nov 20, 2011 at 7:13 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
[cut]
>
> BTW, your lambda could be simpler as you can use expression form for this case:
>
> final C c = () -> { "Hello World" };
>
> Mike
>
>

If you use "{ }" then you are out of luck and you need the return
statement. If I understand correctly lambda body is an Expression (no
return) or a Block (has to contain explicit return).

-- 
Tomasz Kowalczewski


More information about the lambda-dev mailing list