nub package:data-ordlist

On ordered lists, nub is equivalent to nub, except that it runs in linear time instead of quadratic. On unordered lists it also removes elements that are smaller than any preceding element.
nub [1,1,1,2,2] == [1,2]
nub [2,0,1,3,3] == [2,3]
nub = nubBy (<)
The nubBy function is the greedy algorithm that returns a sublist of its input such that:
isSortedBy pred (nubBy pred xs) == True
This is true for all lists, not just ordered lists, and all binary predicates, not just total orders. On infinite lists, this statement is true in a certain mathematical sense, but not a computational one.
The nubSort function is equivalent to nub . sort, except that duplicates are removed as it sorts. It is essentially the same implementation as Data.List.sort, with merge replaced by union. Thus the performance of nubSort should better than or nearly equal to sort alone. It is faster than both sort and nub . sort when the input contains significant quantities of duplicated elements.
The nubSortBy function is the non-overloaded version of nubSort.
The nubSortOn function provides decorate-sort-undecorate for nubSort.
This variant of nubSortOn recomputes the sorting key for each comparison