Skip to contents

Flatten a nested maybe value

Usage

maybe_flatten(.m)

join(.m)

Arguments

.m

A maybe value

Value

A maybe value

Examples

just(just(1)) %>% maybe_flatten()
#> Just
#> [1] 1
just(nothing()) %>% maybe_flatten()
#> Nothing
just(1) %>% maybe_flatten()
#> Just
#> [1] 1
nothing() %>% maybe_flatten()
#> Nothing