ignore
Last updated
Namespace: FsToolkit.ErrorHandling
ignore ignores the value inside an option and returns a unit option. Returns Some () if the option is Some, or None if it is None.
'T option -> unit optionlet result : unit option =
Some 42
|> Option.ignore
// Some ()let result : unit option =
Some "hello"
|> Option.ignore
// Some ()Last updated
let result : unit option =
None
|> Option.ignore
// None