early alpha of D REPL

Martin Nowak code at dawg.eu
Fri Feb 14 05:57:22 PST 2014


On Friday, 14 February 2014 at 11:58:43 UTC, John Colvin wrote:
>> auto twice = (int a) => 2*a;
>> twice(2);
>>
>> What's wrong with that?
>
> Drop the semicolon after twice(2)

Yeah, with a semicolon it's a statement, so it doesn't have any 
result value to print.
Without the semicolon it's an expression.


More information about the Digitalmars-d-announce mailing list