into_option {matchr} | R Documentation |
Convert Object into Option
Description
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.
Usage
into_option(x, ...)
Arguments
x |
Object to be converted |
... |
Objects passed to methods |
Value
an Enum object of class Option
Examples
an_error <- Result$Err("hello world!")
into_option(an_error) # None
[Package matchr version 0.1.0 Index]