Repository navigation
Commit 73840d8
fixup! docs:
The changelog gives `(FrozenSet.forComparer (FrozenSet.comparer set)).ofSeq elements` as the
way to pass a sequence to `IsSubsetOf`, `IsProperSubsetOf`, `IsSupersetOf`,
`IsProperSupersetOf`, `Overlaps` and `SetEquals`, because the members compare the elements in
the comparer of the frozen set.
`FrozenSet.ofSeq elements` converts them with the default comparer, which merges the elements
that it finds equal before the relation sees them. The answer is the one of the member when the
comparer of the frozen 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 frozen set that compares by reference and holds both is a subset of the sequence of
both, but not of the frozen set that the default comparer makes of it, which keeps one of them.
`Overlaps` and `IsSupersetOf` with a sequence stay `Seq.exists` and `Seq.forall` with
`FrozenSet.contains`, which compare in the comparer of the frozen set for every comparer.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>FrozenSet in the changelog and the collection table1 parent bf56850 commit 73840d8
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
0 commit comments