<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Andrei Alexandrescu wrote:<br>>>>>> Is there an interest in joiner(), the corresponding function for<br>
>>>>> join() that joins elements of a range in conjunction with a<br>
>>>>> separator without allocating a new array?<br></div></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Also, interpose(range, element) that returns range[0], element, range[1], element, etc.</div><div>and interleave(range1, range2) that produces range1[0], range2[0], range1[1], range2[1], range1[2], ...</div>
<div><br></div><div>Isn't joiner just chain(interpose(["Mary", "has", "a", "little", "lamb"], "...")?</div><div><br></div><div>std.range.transversal is a bit... short on this one: it just iterates through a 'vertical' slice.</div>
<div><br></div><div><br></div><div><br></div><div>Philippe</div><div> </div></div>