Skip to contents

Evaluate a ternary function on three maybe values

Usage

maybe_map3(.m1, .m2, .m3, .f, ...)

Arguments

.m1

A maybe value

.m2

A maybe value

.m3

A maybe value

.f

A ternary function to apply to the maybe values

...

Named arguments for the function .f

Value

A maybe value

Examples

maybe_map3(just(1), just(2), just(3), function(x, y, z) x + y + z)
#> Just
#> [1] 6
maybe_map3(nothing(), just(2), just(3), function(x, y, z) x / y * z)
#> Nothing