!7 sclass X { S value; *() {} *(S *value) {} } p { Hasher hasher = new Hasher() { public int hashCode(X o) { ret _hashCode(o.value); } public bool equals(X a, X b) { ret a == null ? b == null : b != null && eq(a.value, b.value); } }; CustomCompactHashSet set = new(hasher); X x1 = X("hello"); set.add(x1); assertTrue(set.contains(new X("hello"))); assertFalse(set.contains(new X("world"))); assertSame(x1, set.find(new X("hello"))); assertNull(set.find(new X("world"))); set.remove(x1); assertNull(set.find(new X("hello"))); print("OK"); }