sortOn package:indexed-containers

Sort a list by applying a function to each element and comparing the results.
sortOn negate (mk6 1 4 2 8 5 7) === mk6 8 7 5 4 2 1