and_then3 {maybe} | R Documentation |
Evaluate a ternary maybe returning function on three maybe values
Description
Evaluate a ternary maybe returning function on three maybe values
Usage
and_then3(.m1, .m2, .m3, .f, ...)
Arguments
.m1 |
A maybe value |
.m2 |
A maybe value |
.m3 |
A maybe value |
.f |
A ternary maybe returning function to apply to the maybe values |
... |
Named arguments for the function |
Value
A maybe value
Examples
safe_sum <- maybe(function(x, y, z) sum(x, y, z))
and_then3(just(1), just(2), just(3), safe_sum)
and_then3(nothing(), just(2), just(3), safe_sum)
[Package maybe version 1.1.0 Index]