:: Ord a => [a] -> [a] -package:relude -package:data-ordlist -package:containers -package:hledger-lib -package:extra

The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function. Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.
>>> sort [1,6,4,3,2,5]
[1,2,3,4,5,6]
The argument must be finite.
Like nub, but has O(n log n) complexity instead of O(n^2). Code for ordNub and listUnion taken from Niklas Hambüchen's ordnub package.
A right-biased version of ordNub. Example:
>>> ordNub [1,2,1] :: [Int]
[1,2]
>>> ordNubRight [1,2,1] :: [Int]
[2,1]
Remove duplicates but keep elements in order. O(n * log n)
The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function. Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.
>>> sort [1,6,4,3,2,5]
[1,2,3,4,5,6]
Strip out duplicates
same behavior as nub, but requires Ord and is O(n log n) https://github.com/nh2/haskell-ordnub
candidates for Utility ?
Like nub but runs in O(n * log n) time and requires Ord.
>>> ordNub [3, 3, 3, 2, 2, -1, 1]
[3,2,-1,1]
Like ordNub but also sorts a list.
>>> sortNub [3, 3, 3, 2, 2, -1, 1]
[-1,1,2,3]
O(n log n). Perform a heap sort
Returns an (arbitrary) representative for each list element that occurs more than once. O(n log n).
Remove the first representative for each list element. Thus, returns all duplicate copies. O(n log n). allDuplicates xs == sort $ xs \ nub xs.
Reduce a list of statuses to just one of each status, and if all statuses are present return the empty list.
Sort a list and remove duplicates. Like deleteAllDuplicates, but trades off laziness and stability for efficiency.
O(n log n). Sorts and remove repetitions. Equivalent to nub . sort.
> nubSort [1,2,3]
[1,2,3]
> nubSort [3,2,1]
[1,2,3]
> nubSort [3,2,1,3,2,1]
[1,2,3]
> nubSort [3,3,1,1,2,2]
[1,2,3]
The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.
Sort the list, discarding duplicates.
Get all elements with more than one occurrence.
Equivalent to nub . sort but running in O(n log n).
Extract the elements after the head of a list, which must be non-empty.
>>> tail [1, 2, 3]
[2,3]

>>> tail [1]
[]

>>> tail []
*** Exception: Prelude.tail: empty list
WARNING: This function is partial. You can use case-matching or uncons instead.