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?

Reply via email to