Skip to content

Commit ccef883

Browse files
xperiandriclaude
andcommitted
fixup! docs: Queue and IQueue in the changelog and the collection table
The changelog says what the sequence-input contract does for the queue modules: a function that takes a sequence throws `ArgumentNullException` that names the parameter for a `null` sequence and for a default `FlatList` given as a sequence, in `Queue`, `IQueue` and `queue { }`. Of these functions only `ofSeq` exists in 1.0.0, where a default `FlatList` made it throw `InvalidOperationException` (checked in the 1.0.0 assembly), so `Changed` names `ofSeq` only; the other functions are new. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 0817f05 commit ccef883

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6666
`ofReadOnlySpan`, `ofSpan`, `skipLast`, `sortWithComparer`, `takeLast`, `tryTail`, `tryUncons` and `uncons`. Its
6767
parameters and exceptions name the queues `queue`, `queue1`, `queue2`, `queue3` and `queues` where `List` names its
6868
lists. `enqueueMany`, `uncons`, `tryHead`, `tryTail` and `tryUncons` compile to `EnqueueMany`, `PeekDequeue`,
69-
`TryPeek`, `TryDequeue` and `TryPeekDequeue`, in the `IQueue`, `Option` and `Tuple` modules too.
69+
`TryPeek`, `TryDequeue` and `TryPeekDequeue`, in the `IQueue`, `Option` and `Tuple` modules too. A function that takes
70+
a sequence throws `ArgumentNullException` that names the parameter for a `null` sequence and for a default `FlatList`
71+
given as a sequence, which the BCL would reject with `InvalidOperationException` while it enumerates it; the `IQueue`
72+
module and the `queue { }` expression do the same.
7073
* The `IQueue` module has the functions of `Queue` for `IImmutableQueue<'T>`, without the creation functions, plus
7174
`clear`. Its functions keep the implementation of the input queue where the result has the element type of the input,
7275
and return a `Queue` otherwise. `append` enqueues the second queue into the first one, so its result keeps the
@@ -139,7 +142,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
139142
and `Nil`.
140143
* `Queue`: every function throws what the FSharp.Core `List` function of the same name throws. `head` and `tail` of an
141144
empty queue throw `ArgumentException`, where they threw `InvalidOperationException`, and `iter2` of queues of
142-
different lengths throws `ArgumentException`, where it stopped at the shorter queue.
145+
different lengths throws `ArgumentException`, where it stopped at the shorter queue. A default `FlatList` given as a
146+
sequence to `ofSeq` throws `ArgumentNullException`, where it threw `InvalidOperationException`.
143147
* `Queue.forall` and `Queue.averageBy` apply to the queue; they returned a function of a sequence before.
144148
* `Queue`: `enqueue`, `head` and `tail` compile to `Enqueue`, `Peek` and `Dequeue`, and the other functions to
145149
PascalCase names such as `IsEmpty`, where 1.0.0 compiled all of them under their F# names, such as `isEmpty`.

0 commit comments

Comments
 (0)