Thread overview
Sorting with unaryFun predicate
Jan 06, 2017
Nordlöw
Jan 06, 2017
Nordlöw
Jan 06, 2017
Nordlöw
January 06, 2017
Why isn't there an overload for `std.algorithm.sorting.sort` that takes a `unaryFun` lambda?

Something like

    x[].sort!"a.m";

sorting elements in `x` according to the value of element member `m` compared to the longer

    x[].sort!"a.m < b.m";
January 06, 2017
On Friday, 6 January 2017 at 15:36:42 UTC, Nordlöw wrote:
> Something like
>
>     x[].sort!"a.m";

Perhaps under a different name `sortBy`

   x[].sortBy!"a.m";

January 06, 2017
On Friday, 6 January 2017 at 15:36:42 UTC, Nordlöw wrote:
> Why isn't there an overload for `std.algorithm.sorting.sort` that takes a `unaryFun` lambda?
>
>     x[].sort!"a.m < b.m";

Oops,

http://forum.dlang.org/post/nxdsmdimnfssqmeybuxp@forum.dlang.org
https://github.com/nordlow/phobos-next/blob/master/src/sort_ex.d

Deja vu