Skip to contents

If the maybe value is a 'Nothing' variant FALSE will be returned. If it is a 'Just' variant the contents will be unwrapped and compared to the value argument using base::identical.

Usage

maybe_contains(.m, value)

Arguments

.m

A maybe value

value

A value to check

Value

TRUE or FALSE

Examples

just(1) %>% maybe_contains(1)
#> [1] TRUE
just("a") %>% maybe_contains(1)
#> [1] FALSE
nothing() %>% maybe_contains(1)
#> [1] FALSE