On Tue, 12 Oct 2010 00:47:33 -0400, Daniel Gibson <[email protected]>
wrote:
On Tue, Oct 12, 2010 at 6:37 AM, Daniel Gibson <[email protected]>
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);
Not generalization, I meant specialization. (I should probably go to
bed.)
Well, except for the N memory allocations. Also, for generic ranges you'd
also want to use chain and not "~", but chain won't compose properly in a
reduce.