Skip to content

Commit 9de058d

Browse files
xperiandriclaude
andcommitted
fixup! docs: Stack and IStack in the changelog and the collection table
The changelog says that a function which takes a sequence rejects a default flat list given as a sequence with `ArgumentNullException` that names the parameter (`Stack`, `IStack` and the `stack { }` expression), and that `Stack.ofSeq` of 1.0.0 threw `InvalidOperationException` for it. Both statements were checked by running the functions of the published 1.0.0 assembly and of this branch; `ofSeq` is the only function of the 1.0.0 `Stack` module that takes a sequence. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent bc8c0d0 commit 9de058d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6363
treats it as a list in that order; `rev` puts the last element on top. Its functions name their stacks `stack`,
6464
`stack1` and `stacks` where `List` names its lists, and the exceptions report these names. `consMany`, `uncons`,
6565
`tryHead`, `tryTail` and `tryUncons` compile to `PushMany`, `PeekPop`, `TryPeek`, `TryPop` and `TryPeekPop`, in the
66-
`IStack`, `Option` and `Tuple` modules too.
66+
`IStack`, `Option` and `Tuple` modules too. A function that takes a sequence throws `ArgumentNullException` that names
67+
the parameter for a `null` sequence and for a default `FlatList` given as a sequence, which would fail with
68+
`InvalidOperationException` while the function enumerates it; the `IStack` module and the `stack { }` expression do the
69+
same.
6770
* The `IStack` module has the functions of `Stack` for `IImmutableStack<'T>`, without the creation functions, plus
6871
`clear`. Its functions keep the implementation of the input stack where the result has the element type of the input,
6972
and return a `Stack` otherwise. `append` pushes the first stack onto the second one, which receives the elements, so
@@ -131,6 +134,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
131134
* `Stack`: `ofSeq` and `ofArray` put the first element on top, so that the stack enumerates the elements in the order of
132135
the input. They wrapped `ImmutableStack.CreateRange`, which puts the last element on top. A `null` input throws
133136
`ArgumentNullException` for `source` in `ofSeq` and for `array` in `ofArray`, where 1.0.0 named both parameters `items`.
137+
A default `FlatList` given as a sequence to `ofSeq` throws the same exception as a `null` sequence, where it threw
138+
`InvalidOperationException`.
134139
* `Stack`: `cons`, `head` and `tail` take and return `ImmutableStack<'T>`, where they took and returned
135140
`IImmutableStack<'T>`; the `IStack` module has them for the interface. They compile to `Push`, `Peek` and `Pop`, where
136141
1.0.0 compiled them under their F# names.

0 commit comments

Comments
 (0)