# NOT RUN {
Color <- Enum(
"Color",
Black = c(0,0,0),
Red = c(255,0,0),
Green = c(0, 255, 0),
Blue = c(0, 0, 255),
White = c(255, 255, 255)
)
red_rgb <- unwrap(Color$Red)
blue <- rev(red_rgb)
blue
new_err <- Err("hello world!")
unwrap_or(new_err, "this is not an error")
# }
Run the code above in your browser using DataLab