This article shows how to implement the set built-in at the expense of a dictionary.
Thank you MathGurl for having inspired me so much.