R/maybe.R
maybe_flatten.Rd
Flatten a nested maybe value
maybe_flatten(.m) join(.m)
A maybe value
just(just(1)) %>% maybe_flatten() #> Just #> [1] 1 just(nothing()) %>% maybe_flatten() #> Nothing just(1) %>% maybe_flatten() #> Just #> [1] 1 nothing() %>% maybe_flatten() #> Nothing