fsprojects / FSharp.Control.TaskSeq

A computation expression and module for seamless working with IAsyncEnumerable<'T> as if it is just another sequence
MIT License
91 stars 7 forks source link

Add `TaskSeq.concat` overloads for seq, list, array, resizearray #237

Closed abelbraaksma closed 5 months ago

abelbraaksma commented 5 months ago

Part of the push for good coverage of surface area functions, see #208 for an overview. This implements TaskSeq.concat overloads for seq, list, array and ResizeArray. Reasoning behind specific overloads is that multiple overloads with flex types is not possible: https://github.com/dotnet/fsharp/issues/4943.

Each of these behave exactly like their Seq counterparts:

As before, the xml doc blibs have been taken from seq.fs and modified a bit for readability and applicability to TaskSeq.

The signatures are as follows:

static member concat: sources: TaskSeq<#TaskSeq<'T>> -> TaskSeq<'T> // already there
static member concat: sources: TaskSeq<'T seq> -> TaskSeq<'T>
static member concat: sources: TaskSeq<'T[]> -> TaskSeq<'T>
static member concat: sources: TaskSeq<'T list> -> TaskSeq<'T>
static member concat: sources: TaskSeq<ResizeArray<'T>> -> TaskSeq<'T>

TODO list: