Learn R Programming

matchr (version 0.1.0)

variant: Enum Variant

Description

Return the variant name of an enumerated type.

Usage

variant(x, ...)

Arguments

x

Enum object

...

objects passed to methods

Value

character with the name of the variant or NULL

Examples

Run this code
# NOT RUN {
x <- Result$Ok("hello world!")
variant(x)  # "Ok"
# }

Run the code above in your browser using DataLab