On Wednesday, 12 April 2017 at 21:40:48 UTC, bluecat wrote:
What are some features that you have discovered that you would like to share with the community?
auto use(alias F, T)(T t){return F(t);}
void main()
{ import std.stdio;
foreach(i; 1 .. 11)
{ foreach(j; 1 .. 11) write((i * j).use!(x => x*x), " ");
writeln;
}
}
This way, you can avoid writing long expressions twice with UFCS.
