FsToolkit.ErrorHandling
Search…
README
Result
Option
ResultOption
AsyncResult
map
map2
map3
mapError
apply
foldResult
ofTask
ofTaskAction
bind
ignore
Computation Expression
Operators
Other Functions
TaskResult
JobResult
List
AsyncResultOption
Validation
Test
Powered By
GitBook
bind
AsyncResult.bind
Namespace:
FsToolkit.ErrorHandling
Function Signature:
(
'a
->
Async
<
Result
<
'b
,
'c
>>
)
->
Async
<
Result
<
'a
,
'c
>>
->
Async
<
Result
<
'b
,
'c
>>
Examples
Note: Many use-cases requiring
bind
operations can also be solved using
the
asyncResult
computation expression
.
Example 1
Continuing from the
AsyncResult.map2 example
and given the function
let
notifyFollowers
:
NotifyNewPostRequest
->
Async
<
Result
<
unit
,
exn
>>
we can notify all followers using
AsyncResult.bind
as below:
newPostRequestResult
|>
AsyncResult
.
bind notifyFollowers
Previous
ofTaskAction
Next
ignore
Last modified
9mo ago
Copy link
Outline
AsyncResult.bind
Examples