maybe_map {maybe}R 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)

[Package maybe version 1.1.0 Index]