Why is std.algorithm so complicated to use?
Christophe Travert
travert at phare.normalesup.org
Tue Jul 10 08:21:14 PDT 2012
"Simen Kjaeraas" , dans le message (digitalmars.D:171678), a écrit :
>> Well, I haven't been able to use a single function from std.algorithm
>> without adding a lot of calls to "array" or "to!(string)". I think the
>> things I'm trying to do seems trivial and quite common. I'm I overrating
>> std.algorithm or does it not fit my needs?
>>
>
> bearophile (who else? :p) has suggested the addition of eager and in-place
> versions of some ranges, and I think he has a very good point.
That would have been useful before UFSC.
Now, writing .array() at the end of an algorithm call is not a pain.
int[] = [1, 2, 2, 3].uniq().map!toString().array();
More information about the Digitalmars-d
mailing list