Simpler:

import std.stdio, std.range, std.algorithm;

void main() {
    iota(5).map!((x) {
        write("*");
        return x;
    }).filter!(_ => true).array;
}

Reply via email to