uniques is a faster implementation of nub that satisfies the requirements of this exercise