sortOn package:sort

Sort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.
Sort a list of elements with a stable sort, using the argument compare function determine the ordering, grouping together the equal elements with the grouping function
Sort the list, agregating duplicates with the monoid and ordering the elements by the items generated by the argument function.
Sort the list, discarding duplicates and ordering the elements by the items generated by the argument function.