3 ms·
You can't extend it to support uniqueness based on structural equality, because the Set type uses == to test, and there is no means in the language of overridin
by madhadron 7y ago
You can't extend it to support uniqueness based on structural equality, because the Set type uses == to test, and there is no means in the language of overriding that.
- mirekrusin 7y agoYou can extend it, trivial one would be by subclassing and overriding methods to iterate over all entries doing deep-equal. Better complexity can be achieved by hashing (doesn't need to be collision free) and scanning subsets per hash etc.