Skip to content

Commit b153b03

Browse files
xperiandriclaude
andcommitted
fixup! docs: SortedMap in the changelog and the collection table
The entry on the null checks says that a default `FlatList` given as a sequence throws `ArgumentNullException` too, because it would fail only when it is enumerated, and the entry on `sortedMap { }` lists the inputs of `yield!` and `for` that throw it: a `null` sequence, array or sorted map, and a default `FlatList` given as a sequence. The FAKE parser of the release pipeline (`Fake.Core.ReleaseNotes`) reads the file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent dce6581 commit b153b03

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
136136
* `tryFind`, `tryFindKey`, `tryGetKey` and `tryPick` of `SortedMap` return a `voption`, `tryFindKey` returns the key,
137137
`pick` and `tryPick` take choosers that return a `voption`, and `partition`, `toArray`, `toList`, `toSeq`,
138138
`minKeyValue` and `maxKeyValue` return struct tuples. `find`, `findKey` and `pick` throw the `KeyNotFoundException` of
139-
`Map`, and every function throws `ArgumentNullException` for a `null` map, sequence or builder.
139+
`Map`, and every function throws `ArgumentNullException` for a `null` map, sequence or builder, and for a default
140+
`FlatList` given as a sequence, which would fail only when it is enumerated.
140141
* `SortedMap` keeps the convention of `ImmutableSortedDictionary` where it differs from `Map`: a new value of a key that
141142
the value comparer finds equal to the current one leaves the binding as it is, its key included, in `add`, `change`,
142143
`setItem`, `setItems`, `addRange`, the creation functions and members, and `sortedMap { }`. `add` is the `Add` of
@@ -148,7 +149,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
148149
* The `FSharp.Collections.Immutable.Option` and `FSharp.Collections.Immutable.Tuple` namespaces have `SortedMap` modules
149150
that repeat the functions that use value options or return struct tuples with options and reference tuples.
150151
* `sortedMap { }` builds a sorted map from `yield struct (key, value)` and `yield KeyValuePair (key, value)`;
151-
`SortedMapCE` takes a key comparer, and a `null` one throws `ArgumentNullException`.
152+
`SortedMapCE` takes a key comparer, and a `null` one throws `ArgumentNullException`, as do `yield!` of a `null`
153+
sequence, array or sorted map, `for` over a `null` sequence, and a default `FlatList` given as a sequence to `yield!`
154+
or `for`.
152155

153156
### Changed
154157

0 commit comments

Comments
 (0)