Why is std.algorithm so complicated to use?

Jacob Carlborg doob at me.com
Tue Jul 10 11:59:21 PDT 2012


On 2012-07-10 19:23, Daniel Murphy wrote:

> writeln([1, 2, 3].map!"a"()[2]);
>
> Sort is in place, and therefore requires more than random access, you need
> to be able to modify the data you're operating on.
>
> Something like [3, 4].map!func().selectionSort() could work lazily without
> needing to modify the original range, but urrgh.

Ok, I think I get it now.

-- 
/Jacob Carlborg




More information about the Digitalmars-d mailing list