How to concatenate a range of ranges ("RoR") in D?

d, range

Solution

Use `std.algorithm.joiner`. e.g.

auto ror = [ [1, 2, 3],  [4, 5, 6], [7, 8, 9] ];
auto joined = joiner(ror);
assert(equal(joined, [1, 2, 3, 4, 5, 6, 7, 8, 9]));

Problem

What is the best way to lazily concatentate together a range of ranges in D?

Original source