Repository navigation
Commit b38b9eb
feat:
`IndexedList` (`ImmutableList<'T>`) replaces the `ImmutableList` module. It has every function of `List` that applies to
an immutable list, with the parameter names, the checks and the exceptions of `List` and with stable sorts, plus the
extras of ADR 0001: `add`, `binarySearch`, `blit`, `cons`, `uncons`, `tryUncons`, the struct partial patterns `Cons` and
`Nil`, `indexOf`, `lastIndexOf`, `skipLast`, `takeLast`, `tryTail` and `sortWithComparer`. `IIndexedList` has the same
functions for `IImmutableList<'T>` without creation, builder, `binarySearch` and `blit`, plus `clear`; a result with the
element type of the input keeps the implementation of the input. The `Option` and `Tuple` namespaces repeat the
functions that use value options or struct tuples, `IndexedListBuilder` works on the builder of an indexed list, and
`indexedList { }` builds one.
`Helper.fs` gains three internal modules for the modules that mirror `List`: `ListChecks` throws the exceptions of `List`
for lengths and indices with the parameter names that the caller passes, `ListArrays` runs the functions of two and three
lists over arrays and checks the lengths after the common prefix, as `List` does, and `Snapshot` copies a collection into
an array.
The `ImmutableList` and `IndexedSeq` modules, the `ReadOnlyList` alias and the `IIndexedSeq<'T>` abbreviation are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>IndexedList and IIndexedList modules with the vocabulary of the FSharp.Core List module1 parent 2b5179a commit b38b9eb
19 files changed
Lines changed: 6445 additions & 372 deletions
File tree
- src/FSharp.Collections.Immutable
- IndexedList
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
32 | 46 | | |
33 | | - | |
34 | 47 | | |
35 | | - | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| |||
Large diffs are not rendered by default.
This file was deleted.
0 commit comments