Skip to content

Commit 8486e1b

Browse files
committed
Fix Task.bind
1 parent f326bc7 commit 8486e1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/FSharp.Control.TaskSeq/Utils.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ module Task =
4646
}
4747

4848
/// Bind a Task<'T>
49-
let inline bind binder (task: Task<'T>) : Task<'U> = TaskBuilder.task { return! binder task }
49+
let inline bind binder (task: Task<'T>) : Task<'U> =
50+
TaskBuilder.task {
51+
let! t = task
52+
return! binder t
53+
}
5054

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

0 commit comments

Comments
 (0)