:: Ord a => [a] -> [a] -package:base -package:imports -package:lens -package:statistics -package:incipit-base package:witherable is:exact

Removes duplicate elements from a list, keeping only the first occurrence. This is asymptotically faster than using nub from Data.List.
>>> ordNub [3,2,1,3,2,1]
[3,2,1]