Taking Parranoia's suggestion a step further, Sets don't allow duplicate items, returning false when adding a duplicate item is attempted. Instead of "remembering it," items popped from the stack...