bind

JobResult.bind

Namespace: FsToolkit.ErrorHandling

Function Signature:

('a -> Job<Result<'b, 'c>>)
  -> Job<Result<'a, 'c>>
  -> Job<Result<'b, 'c>>

Examples

Note: Many use-cases requiring bind operations can also be solved using the jobResult computation expression.

Example 1

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:

newPostRequestResult |> JobResult.bind notifyFollowers

Last updated