monads (version 0.0.0.9000)

maybe: Maybe there is something here?

Description

Or maybe there's just a NULL.

Usage

maybe(x)

nothing()

Arguments

x

Is there something here? Maybe.

Examples

Run this code
double <- function(x) x * 2
maybe(10) %>>% double()
nothing() %>>% double()

Run the code above in your browser using DataLab