On Tuesday, 16 March 2021 at 13:52:29 UTC, Per Nordlöw wrote:
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:foreach(0..n) could work. Why though.When performing a side-effect n times.
Then why not just do: auto times(alias F, T)(T number) { return number.iota.each!(_ => F()); } void f() { writeln("hi"); } n.times!(f); ?