R/maybe.R
and_then2.Rd
Evaluate a binary maybe returning function on two maybe values
and_then2(.m1, .m2, .f, ...)
A maybe value
A binary maybe returning function to apply to the maybe values
Named arguments for the function .f
.f
and_then2(just(1), just(2), maybe(`+`)) #> Just #> [1] 3 and_then2(nothing(), just(2), maybe(`/`)) #> Nothing