Andrei Alexandrescu wrote:
>>>>> Is there an interest in joiner(), the corresponding function for
>>>>> join() that joins elements of a range in conjunction with a
>>>>> separator without allocating a new array?

Seeing your code in svn, wouldn't also a flatten() (or, concat() ) function be interesting? It transforms a range of ranges (of whatever depth) into a linear range.

Also, interpose(range, element) that returns range[0], element, range[1], element, etc.
and interleave(range1, range2) that produces range1[0], range2[0], range1[1], range2[1], range1[2], ...

Isn't joiner just chain(interpose(["Mary", "has", "a", "little", "lamb"], "...")?

std.range.transversal is a bit... short on this one: it just iterates through a 'vertical' slice.



Philippe