sortOn: sorts range of aggregates by member name(s)
"Nordlöw" via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 5 06:07:08 PST 2014
On Wednesday, 5 November 2014 at 11:18:56 UTC, Marc Schütz wrote:
> This could also be an arbitrary expression, of course:
>
> r.sortBy!"x*x + y*y + z*z"
>
> The above could be implemented using `with` and
> `std.functional.unaryFun`. Alternatively, a lambda could be
> used:
>
> r.sortBy!(a => a.norm);
Ok. Great. What do you think about the name sortBy?
More information about the Digitalmars-d
mailing list