uniq and uniq_p don't work as intended
josephcsible opened this issue ยท 1 comments
TwoThree problems are apparent with the above code:
- If two objects have the same hash code, they'll be treated as equal whether or not they actually are.
- It's possible that two objects that the predicate considers equal will have different hash codes. This means that even discounting problem 1, this isn't a total order, so the set may misbehave.
- The order of elements isn't preserved.