An input range of input ranges to be joined.
A range of elements in the joined range. This will be a forward range if both outer and inner ranges of RoR are forward ranges; otherwise it will be only an input range.
1 import std.algorithm.comparison : equal; 2 import std.conv : text; 3 4 assert(["abc", "def"].joiner.equal("abcdef")); 5 assert(["Mary", "has", "a", "little", "lamb"] 6 .joiner("...") 7 .equal("Mary...has...a...little...lamb")); 8 assert(["", "abc"].joiner("xyz").equal("xyzabc")); 9 assert([""].joiner("xyz").equal("")); 10 assert(["", ""].joiner("xyz").equal("xyz"));
std.range.chain, which chains a sequence of ranges with compatible elements into a single range.
Lazily joins a range of ranges with a separator. The separator itself is a range. If a separator is not provided, then the ranges are joined directly without anything in between them (often called flatten in other languages).