I need a data-structure, which supports the following operations both memory and time-efficient, it can be assumed, that the value has an ordering.
- Add a value to the structure
- Find out, whether a value is in the structure
Plus, the structure has to be immutable, because I want to use Haskell.
If I would not assume immutability, probably a bloom filter is my choice.
I'm coding on my optimization problem and because I can't be shure, whether an entry was already processed, I have to lookup.