ignore

TaskResultOption.ignore

Namespace: FsToolkit.ErrorHandling

Function Signature:

Task<Result<'a option, 'b>> -> Task<Result<unit option, 'b>>

This is a shortcut for TaskResultOption.map ignore.

Examples

Example 1

let deletePostIfExists : DeletePostRequest -> Task<Result<Post option, exn>>

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

let deletePost = taskResultOption {
  do! deletePostIfExists deletePostRequest |> TaskResultOption.ignore
}

Last updated