Skip to content

Commit ebb8a2d

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 8295899 commit ebb8a2d

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
@@ -67,7 +67,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6767
treats it as a list in that order; `rev` puts the last element on top. Its functions name their stacks `stack`,
6868
`stack1` and `stacks` where `List` names its lists, and the exceptions report these names. `consMany`, `uncons`,
6969
`tryHead`, `tryTail` and `tryUncons` compile to `PushMany`, `PeekPop`, `TryPeek`, `TryPop` and `TryPeekPop`, in the
70-
`IStack`, `Option` and `Tuple` modules too.
70+
`IStack`, `Option` and `Tuple` modules too. A function that takes a sequence throws `ArgumentNullException` that names
71+
the parameter for a `null` sequence and for a default `FlatList` given as a sequence, which would fail with
72+
`InvalidOperationException` while the function enumerates it; the `IStack` module and the `stack { }` expression do the
73+
same.
7174
* The `IStack` module has the functions of `Stack` for `IImmutableStack<'T>`, without the creation functions, plus
7275
`clear`. Its functions keep the implementation of the input stack where the result has the element type of the input,
7376
and return a `Stack` otherwise. `append` pushes the first stack onto the second one, which receives the elements, so
@@ -135,6 +138,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
135138
* `Stack`: `ofSeq` and `ofArray` put the first element on top, so that the stack enumerates the elements in the order of
136139
the input. They wrapped `ImmutableStack.CreateRange`, which puts the last element on top. A `null` input throws
137140
`ArgumentNullException` for `source` in `ofSeq` and for `array` in `ofArray`, where 1.0.0 named both parameters `items`.
141+
A default `FlatList` given as a sequence to `ofSeq` throws the same exception as a `null` sequence, where it threw
142+
`InvalidOperationException`.
138143
* `Stack`: `cons`, `head` and `tail` take and return `ImmutableStack<'T>`, where they took and returned
139144
`IImmutableStack<'T>`; the `IStack` module has them for the interface. They compile to `Push`, `Peek` and `Pop`, where
140145
1.0.0 compiled them under their F# names.

0 commit comments

Comments
 (0)