improving the join function

Daniel Gibson metalcaedes at gmail.com
Mon Oct 11 21:47:33 PDT 2010


On Tue, Oct 12, 2010 at 6:37 AM, Daniel Gibson <metalcaedes at gmail.com> 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.)


More information about the Digitalmars-d mailing list