Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Adds support for AsyncSeq to the asyncResult builder in FsToolkit.ErrorHandling

License

Notifications You must be signed in to change notification settings

njlr/FsToolkit.ErrorHandling.AsyncSeq

Repository files navigation

This is now being rolled into the FsToolkit.ErrorHandling repo

FsToolkit.ErrorHandling.AsyncSeq

Allows usage of AsyncSeq<'t> and AsyncSeq<Result<'t, 'e>> in Async<Result<'t, 'e>> builders.

With Paket:

dotnet paket add FsToolkit.ErrorHandling.AsyncSeq

In a script:

#r "nuget: FSharp.Control.AsyncSeq"
#r "nuget: FsToolkit.ErrorHandling"
#r "nuget: FsToolkit.ErrorHandling.AsyncSeq"

open FSharp.Control
open FsToolkit.ErrorHandling

let xs =
  asyncSeq {
    1
    2
    3
  }

asyncResult {
  let mutable sum = 0

  for x in xs do
    sum <- sum + x

  return sum
}
|> Async.RunSynchronously
|> printfn "%A"

About

Adds support for AsyncSeq to the asyncResult builder in FsToolkit.ErrorHandling

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages