nub package:Cabal-syntax

The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence'.) It is a special case of nubBy, which allows the programmer to supply their own equality test.
>>> nub [1,2,3,4,3,2,1,2,4,3,5]
[1,2,3,4,5]
If the order of outputs does not matter and there exists instance Ord a, it's faster to use map Data.List.NonEmpty.head . Data.List.NonEmpty.group . sort, which takes only <math> time.
The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded == function.
>>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6]
[1,2,6]
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.
Like ordNub and nubBy. Selects a key for each element and takes the nub based on that key.
A right-biased version of ordNub. Example:
>>> ordNub [1,2,1] :: [Int]
[1,2]
>>> ordNubRight [1,2,1] :: [Int]
[2,1]