On 10/11/10 23:37 CDT, Daniel Gibson wrote:
Btw: Is "join" not just a (rather trivial) generalization of reduce?auto inRange = ...; // range of char[] char[] sep = " "; auto joined = reduce!( (char[] res, char[] x) {return res~sep~x;}) (inRange);
It is, but things are a bit messed up by empty ranges.
auto joined = inRange.empty
? reduce!( (char[] res, char[] x) {return res~sep~x;})(inRange)
: "":
Andrei
