and_then2: Evaluate a binary maybe returning function on two maybe...

View source: R/maybe.R

and_then2R Documentation

Evaluate a binary maybe returning function on two maybe values

Description

Evaluate a binary maybe returning function on two maybe values

Usage

and_then2(.m1, .m2, .f, ...)

Arguments

.m1

A maybe value

.m2

A maybe value

.f

A binary maybe returning function to apply to the maybe values

...

Named arguments for the function .f

Value

A maybe value

Examples

and_then2(just(1), just(2), maybe(`+`))
and_then2(nothing(), just(2), maybe(`/`))

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