On Friday, 29 April 2016 at 12:01:19 UTC, Joel wrote:
On Friday, 29 April 2016 at 11:31:51 UTC, rikki cattermole wrote:
Not entirely the goal I'm guessing output wise, but this works.

import std.range : repeat;
foreach(line; 1 .. 11) {
        writeln('#'.repeat(line));
}

That is shorter than my foreach version, but I want one that doesn't use foreach in it at all.

Try this:

iota(1,11).each!(a => writeln("#".replicate(a)))

Reply via email to