Repository navigation
Commit 8aabf53
fixup! feat:
Follows the reworked ADR 0001 (D2, D5) and the review of #31:
- `IndexedList`, `IIndexedList`, their `Option` and `Tuple` modules and `IndexedListBuilder` are the
root modules of their files. The `IndexedList<'T>` abbreviation moves to
`IndexedList/IndexedListTypes.fs`, which needs no signature file.
- `binarySearch`, the sorts of both modules and the sort of the builder compare with the cached
`DefaultComparer<'T>.Instance`, so a call no longer creates a comparer.
- `IndexedList.rev` reverses a copy of the elements with `Array.Reverse` and builds the result with
`ImmutableList.CreateRange`. At 100 000 elements, this is about 2.5 times faster than
`ImmutableList.Reverse`, with the same allocation. `IIndexedList.rev` reverses its copy in place
too and keeps the implementation of the input.
- `removeManyAt` of both modules removes nothing when `index + count` overflows, as
`List.removeManyAt` does. Before, the range went to `RemoveRange`, which threw.
- `Helper.fs` gets the internal `Lengths` module for `Queue`, `Stack` and their interface modules:
`queueUpTo` and `stackUpTo` count a queue or a stack only up to a limit.
- Two crefs name the right members: `FastGenericComparer` is a method, and the cref of `ofBuilder`
writes the nested generic builder as the documentation ID does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>IndexedList and IIndexedList modules with the vocabulary of the FSharp.Core List module1 parent f6fff46 commit 8aabf53
16 files changed
Lines changed: 5757 additions & 5716 deletions
File tree
- src/FSharp.Collections.Immutable
- IndexedList
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
0 commit comments