Skip to content

Instantly share code, notes, and snippets.

@medigor
Created August 4, 2020 09:13
Show Gist options
  • Save medigor/f9dd82f8b2f6fc654855ddffa3c0e98d to your computer and use it in GitHub Desktop.
Save medigor/f9dd82f8b2f6fc654855ddffa3c0e98d to your computer and use it in GitHub Desktop.
[<AutoOpen>]
module AsyncBuilder =
open System.Threading.Tasks
type AsyncBuilder with
member inline _.Bind(task: Task<_>, f) = async.Bind(task |> Async.AwaitTask, f)
member inline _.Bind(task: Task, f) = async.Bind(task |> Async.AwaitTask, f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment