Repository navigation
Commit 58d1f96
fixup! docs:
The changelog gave `HashSet.ofSeq elements` as the way to pass a sequence to `IsSubsetOf`,
`IsProperSubsetOf`, `IsProperSupersetOf`, `SetEquals`, `Intersect` and `SymmetricExcept`, or
`(HashSet.forComparer (HashSet.comparer set)).ofSeq elements` to give the elements the
comparer of the first hash set. `ofSeq elements` converts them with the default comparer,
which merges the elements that it finds equal before the function sees them. The answer is the
one of the member when the comparer of the hash set finds equal every pair of elements that the
default comparer finds equal, as the default comparer and `StringComparer.OrdinalIgnoreCase`
do. It can differ when the comparer tells such elements apart, as `HashIdentity.Reference` does
for two strings with the same text: a hash set that compares by reference and holds both is a
subset of the sequence of both, but not of the hash set that the default comparer makes of it,
which keeps one of them.
The conversion with the comparer of the first hash set is now the recipe, `HashSet.ofSeq` is
named with the condition and the counterexample, and `Overlaps` and `IsSupersetOf` stay
`Seq.exists` and `Seq.forall` with `HashSet.contains`, which compare in the comparer of the hash
set for every comparer. The `ISet` bullet gives the recipe of the interface, which cannot tell its
comparer: `ISet.addRange elements (ISet.clear set)`, which has the implementation and the
comparer of the set.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>HashSet and ISet in the changelog and the collection table1 parent db01e7f commit 58d1f96
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
69 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
0 commit comments