powered by
Test whether Option Enum is Some or None.
is.none(x)
object to be tested
TRUE if x is enumerated type of variant None, FALSE otherwise
TRUE
x
None
FALSE
# NOT RUN { x <- 1:5 get_n <- function(x, n) { if (n > length(x)) return(None) Some(x[n]) } obj <- get_n(x, 6) is.none(obj) # TRUE # }
Run the code above in your browser using DataLab