Namespace: FsToolkit.ErrorHandling

Function Signature:

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

This is a shortcut for ResultOption.map ignore.


Example 1

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

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

let deletePost = resultOption {
  do! deletePostIfExists deletePostRequest |> ResultOption.ignore

Last updated