Interest in std.algorithm.joiner?

dsimcha dsimcha at yahoo.com
Tue Jul 27 09:55:53 PDT 2010


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
> We have std.algorithm.splitter which splits a range into components
> without allocating a new array.
> 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?
> Andrei

Absolutely.  I was thinking a while back I was going to suggest a
std.range.flattener() or std.algorithm.flattener() that takes a range of ranges
and turns them into a single range, one right after the other.  joiner() would be
a generalization of this in that to flatten a ror, you'd just join it on an empty
range.


More information about the Digitalmars-d mailing list