Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1f1532e
feat: `FlatList` module with the vocabulary of the FSharp.Core `Array…
xperiandri Oct 18, 2026
b798db5
test: shared contracts of the sequence-like modules, run for `FlatList`
xperiandri Oct 18, 2026
43e4fd5
docs: `FlatList` in the changelog and the collection table
xperiandri Oct 18, 2026
8ef6a97
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
35ec01e
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
a827005
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
0bab4fe
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
2925ceb
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
f946e17
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
cf8ef72
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
5548903
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
bbdda1b
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
8b69d52
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
047ee9b
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
377bf02
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
c487fb3
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
7935f61
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
0121a2a
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
85201fe
fixup! docs: `FlatList` in the changelog and the collection table
xperiandri Oct 18, 2026
353a938
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
3225f5e
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
502f2cf
fixup! docs: `FlatList` in the changelog and the collection table
xperiandri Oct 18, 2026
256046c
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
9ee3a95
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
c1dd50a
fixup! docs: `FlatList` in the changelog and the collection table
xperiandri Oct 18, 2026
eac71ec
fixup! feat: `FlatList` module with the vocabulary of the FSharp.Core…
xperiandri Oct 18, 2026
c921c91
fixup! test: shared contracts of the sequence-like modules, run for `…
xperiandri Oct 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

* `FlatList` has every function of the FSharp.Core `Array` module that applies to an immutable array, with its semantics
and exceptions, plus `add`, `asMemory`, `asSpan`, `binarySearch`, `indexOf`, `indexOfWith`, `lastIndexOf`,
`lastIndexOfWith`, `ofReadOnlySpan`, `ofSpan`, `skipLast`, `sortWithComparer`, `takeLast` and `tryTail`.
* The `FSharp.Collections.Immutable.Option.FlatList` and `FSharp.Collections.Immutable.Tuple.FlatList` modules repeat the
functions that use value options or struct tuples with options and reference tuples.
* The `FlatListBuilder` module works on the builder of a flat list, and `flatList { }` builds a flat list.

### Changed

* The package targets `net8.0` and `net10.0`.
* The package requires FSharp.Core 10.1.301 or later, the first release with `partitionWith`.
* `FlatList`: the `try*` functions return `voption`; `choose`, `pick`, `tryPick` and `unfold` take functions that return
`voption`; the functions that return tuples return struct tuples.
* `FlatList`: every function throws what the FSharp.Core `Array` function of the same name throws. `take` and `splitAt`
throw for a count beyond the length, and a default `ImmutableArray` throws `ArgumentNullException`.

### Removed

* `FlatList.index`, `indexWith`, `indexFrom`, `indexFromWith`, `indexRange`, `indexRangeWith` and their `lastIndex`
counterparts: use `indexOf`, `indexOfWith`, `lastIndexOf` and `lastIndexOfWith`.
* `FlatList.removeAll`, `removeAllWith`, `removeRange`, `sortRange`, `sortRangeWith`, `sortRangeWithComparer` and `sub`,
and the `ImmutableArray` module alias of `FlatList`.
* The `Seq` module of conversions between the collections.

## [1.0.0] - 2020-02-23

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Please also join the [F# Open Source Group](http://fsharp.github.com)

| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | – |
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
2 changes: 1 addition & 1 deletion docsSrc/Explanations/Background.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ While F# has its own built-in immutable collections, System.Collections.Immutabl

| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | – |
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
2 changes: 1 addition & 1 deletion docsSrc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ F# bindings for [System.Collections.Immutable](https://learn.microsoft.com/en-us

| Module | .NET type | Computation expression |
|---|---|---|
| `FlatList` | `ImmutableArray<'T>` | – |
| `FlatList` | `ImmutableArray<'T>` | `flatList { }` |
| `ImmutableList` | `ImmutableList<'T>` | – |
| `Stack` | `ImmutableStack<'T>` | – |
| `Queue` | `ImmutableQueue<'T>` | – |
Expand Down
6 changes: 6 additions & 0 deletions src/FSharp.Collections.Immutable/ComputationExpressions.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[<AutoOpen>]
module FSharp.Collections.Immutable.ComputationExpressions

// ---- Creation ----

let flatList = FlatListCE ()
21 changes: 21 additions & 0 deletions src/FSharp.Collections.Immutable/ComputationExpressions.fsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// <summary>
/// The computation expressions of the collections (ADR 0001, D7).
/// </summary>
[<AutoOpen>]
module FSharp.Collections.Immutable.ComputationExpressions

// ---- Creation ----

/// <summary>Builds a flat list.</summary>
/// <example id="flatList-1">
/// <code lang="fsharp">
/// let squares = flatList {
/// yield 0
/// for i in 1..3 do
/// yield i * i
/// yield! [ 100; 200 ]
/// }
/// </code>
/// Evaluates to a flat list of 0, 1, 4, 9, 100 and 200.
/// </example>
val flatList : FlatListCE
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,25 @@
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="Helper.fs" />
<Compile Include="FlatList.fs" />
<Compile Include="FlatList\FlatListTypes.fs" />
<Compile Include="FlatList\FlatList.fsi" />
<Compile Include="FlatList\FlatList.fs" />
<Compile Include="FlatList\FlatListOption.fsi" />
<Compile Include="FlatList\FlatListOption.fs" />
<Compile Include="FlatList\FlatListTuple.fsi" />
<Compile Include="FlatList\FlatListTuple.fs" />
<Compile Include="FlatList\FlatListBuilder.fsi" />
<Compile Include="FlatList\FlatListBuilder.fs" />
<Compile Include="FlatList\FlatListCE.fsi" />
<Compile Include="FlatList\FlatListCE.fs" />
Comment thread
xperiandri marked this conversation as resolved.
Resolved
<Compile Include="Stack.fs" />
<Compile Include="ImmutableList.fs" />
<Compile Include="Queue.fs" />
<Compile Include="IndexedSeq.fs" />
<Compile Include="Maps.fs" />
<Compile Include="Sets.fs" />
<Compile Include="Seq.fs" />
<Compile Include="ComputationExpressions.fsi" />
<Compile Include="ComputationExpressions.fs" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading