Why is std.algorithm so complicated to use?

Timon Gehr timon.gehr at gmx.ch
Tue Jul 10 08:00:02 PDT 2012


On 07/10/2012 02:53 PM, Dmitry Olshansky wrote:
> On 10-Jul-12 15:37, Jacob Carlborg wrote:
>> On 2012-07-10 12:05, Dmitry Olshansky wrote:
>>
>>> and what type has the return of map ? Let me guess - array.
>>
>> Yes, and that is what I _want_.
>
> Too bad, as there is no need to make an array when you map something.
>
> I have no need for streaming data from
>> the network into a linked list, filter it and then convert it to an
>> array (or something similar). I want to start with an array and end with
>> an array.
>>
>
> Then you need something like transform. Anyway the result of map should
> be sortable it's a bug.
>

What would sort do? Special case the result of map and then call
schwartzSort on the underlying range?



More information about the Digitalmars-d mailing list