On 6/28/16 7:35 AM, Ola Fosheim Grøstad wrote:alias func = (int i) => i*i; ?Is that valid in the compiler, or are you proposing it? I haven't used or seen such a thing.
It does work:
----
import std.stdio;
alias func1 = (int i) => i*i;
alias func2 = function int (int i){ return i+i;};
void main(){
writeln(func1(3), " ", func2(4), " ", func1);
}
----
https://dpaste.dzfl.pl/5d35ab068c2b
