sortBy package:vector-algorithms

A fully parameterized version of the sorting algorithm. Again, this function takes both radix information and a comparison, because the algorithms falls back to insertion sort for small arrays.
Sorts an entire array using a custom ordering.
Sorts an entire array using a given comparison
A variant on sortBy which returns a vector of unique elements.
Sorts an array using a custom comparison.
Radix sorts an array using custom radix information requires the number of passes to fully sort the array, the size of of auxiliary arrays necessary (should be one greater than the maximum value returned by the radix function), and a radix function, which takes the pass and an element, and returns the relevant radix.
Sorts a portion of an array [l,u) using a custom ordering
Sorts the portion of an array delimited by [l,u)
Sorts the portion of the array delimited by [l,u) under the assumption that [l,m) is already sorted.
Moves the lowest k elements (as defined by the comparison) to the front of the array, sorted. The remaining values of the array will be in no particular order.
Moves the lowest k elements in the portion [l,u) of the array into positions [l,k+l), sorted. The remaining values in [l,u) will be in no particular order. Values outside the range [l,u) will be unaffected.
Moves the least k elements (as defined by the comparison) to the front of the array, sorted.
Moves the least k elements in the interval [l,u) to the positions [l,k+l), sorted.