Why is std.algorithm so complicated to use?

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Jul 10 03:05:39 PDT 2012


On 10-Jul-12 13:35, Jacob Carlborg wrote:
> On 2012-07-10 08:59, Dmitry Olshansky wrote:
>
>> Can you do it in other languages?
>
> Sure, in Ruby, but that only works on arrays:
>
> p [5, 3, 5, 6, 8].uniq.map{ |e| e.to_s }.sort
>

and what type has the return of map ? Let me guess - array.
> Prints:
>
> ["3", "5", "6", "8"]
>
Please count the number of allocations in your paste of Ruby.

-- 
Dmitry Olshansky




More information about the Digitalmars-d mailing list