ignore

JobResult.ignore

Namespace: FsToolkit.ErrorHandling

Function Signature:

Job<Result<'a, 'b>> -> Job<Result<unit, 'b>>

This is a shortcut for JobResult.map ignore.

Examples

Example 1

let savePost : CreatePostRequest -> Job<Result<PostId, exn>>

We can call this with the do! syntax inside a computation expression using JobResult.ignore as below:

let makePost = jobResult {
  do! savePost createPostRequest |> JobResult.ignore
}

Last updated