On Thursday, 13 April 2017 at 11:16:46 UTC, crimaniak wrote:
If fact you don't need any template to do this. Try the next:

    foreach(i; 1 .. 11)
    {   foreach(j; 1 .. 11) write((x => x*x)(i * j), " ");
        writeln;
    }

True, that's a good trick too. But I prefer the template at least sometimes because I ususally construct the argument up first and only then start to think about what function to call. With the use template, I can write and read in order I think -Exactly the reason why UFCS rules in my opinion.

Reply via email to