Skip to contents

Evaluate a function on a maybe value

Usage

maybe_map(.m, .f, ...)

fmap(.m, .f, ...)

Arguments

.m

A maybe value

.f

A function to apply to the maybe value

...

Named arguments for the function .f

Value

A maybe value

Examples

just(9) %>% maybe_map(sqrt)
#> Just
#> [1] 3
nothing() %>% maybe_map(sqrt)
#> Nothing