Toy implementation of sets in javascript