into_option {matchr} | R Documentation |
Create an Option
out of an object. By default the object is wrapped in a Some
variant.
Ok
variants of Result
are turned into Some
Options, while Err
variants are
turned into None
Options.
into_option(x, ...)
x |
Object to be converted |
... |
Objects passed to methods |
an Enum object of class Option
an_error <- Result$Err("hello world!")
into_option(an_error) # None