Skip to content

Commit

Permalink
Fix Task.bind
Browse files Browse the repository at this point in the history
  • Loading branch information
abelbraaksma committed Nov 6, 2022
1 parent f326bc7 commit 8486e1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FSharp.Control.TaskSeq/Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ module Task =
}

/// Bind a Task<'T>
let inline bind binder (task: Task<'T>) : Task<'U> = TaskBuilder.task { return! binder task }
let inline bind binder (task: Task<'T>) : Task<'U> =
TaskBuilder.task {
let! t = task
return! binder t
}

/// Create a task from a value
let inline fromResult (value: 'U) : Task<'U> = TaskBuilder.task { return value }
Expand Down

0 comments on commit 8486e1b

Please sign in to comment.