This article shows how to implement the set built-in at the expense of a dictionary.
WolframAlpha helped me a lot when studying for Calculus...