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

Implement `TaskSeq.forall` and `forallAsync` #240

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.forall, TaskSeq.forallAsync.

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 forall: predicate: ('T -> bool) -> source: TaskSeq<'T> -> Task<bool>
static member forallAsync: predicate: ('T -> #Task<bool>) -> source: TaskSeq<'T> -> Task<bool>

TODO list:

abelbraaksma commented 5 months ago

Unit tests added, rebased, should be good to go now. This was the last PR related to the list in #208.