maybe_map: Evaluate a function on a maybe value

View source: R/maybe.R

maybe_mapR Documentation

Evaluate a function on a maybe value

Description

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)
nothing() %>% maybe_map(sqrt)

maybe documentation built on Aug. 7, 2023, 5:11 p.m.