digitalmars.D.learn - Sorting with unaryFun predicate
- =?UTF-8?B?Tm9yZGzDtnc=?= (7/7) Jan 06 2017 Why isn't there an overload for `std.algorithm.sorting.sort` that
- =?UTF-8?B?Tm9yZGzDtnc=?= (3/5) Jan 06 2017 Perhaps under a different name `sortBy`
- =?UTF-8?B?Tm9yZGzDtnc=?= (5/8) Jan 06 2017 Oops,
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";
Jan 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";
Jan 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
Jan 06 2017