"for" statement issue

mogu via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 21 08:26:12 PDT 2016


Allow new syntax makes codes simpler in some cases:

writeln({
     int a = 5;
     return a + 5;
}());

=>

writeln{
     int a = 5;
     return a + 5;
}();

[1,2,3].fold!((a, b) => a + b).writeln;

=>

[1,2,3].fold!{a, b => a + b}.writeln;


More information about the Digitalmars-d mailing list