Last updated 3 years ago
Namespace: FsToolkit.ErrorHandling
FsToolkit.ErrorHandling
Function Signature:
('a -> Job<Result<'b, 'c>>) -> Job<Result<'a, 'c>> -> Job<Result<'b, 'c>>
Note: Many use-cases requiring bind operations can also be solved using .
bind
Continuing from the JobResult.map2 example and given the function
let notifyFollowers : NotifyNewPostRequest -> Job<Result<unit,exn>>
we can notify all followers using JobResult.bind as below:
JobResult.bind
newPostRequestResult |> JobResult.bind notifyFollowers
jobResult