The Maybe Monad


[Up] [Top]

Documentation for package ‘maybe’ version 1.1.0

Help Pages

and Combine predicate functions to check if all are TRUE
and_then Evaluate a maybe returning function on a maybe value
and_then2 Evaluate a binary maybe returning function on two maybe values
and_then3 Evaluate a ternary maybe returning function on three maybe values
bind Evaluate a maybe returning function on a maybe value
filter_justs Filter and unwrap a list of 'Just' values
filter_map Map a function over a list and filter only 'Just' values
fmap Evaluate a function on a maybe value
from_just Unwrap a 'Just' value or throw an error
from_maybe Unwrap a maybe value or return a default
is_just Check if an object is a 'Just' value
is_maybe Check if an object is a maybe value
is_nothing Check if an object is a 'Nothing' value
join Flatten a nested maybe value
just Create a 'Just' variant of a maybe value
maybe Modify a function to return a maybe value
maybe_case Unwrap and call a function on a maybe value or return a default
maybe_contains Check if a maybe value contains a specific value
maybe_equal Check if two maybe values are equal
maybe_flatten Flatten a nested maybe value
maybe_map Evaluate a function on a maybe value
maybe_map2 Evaluate a binary function on two maybe values
maybe_map3 Evaluate a ternary function on three maybe values
nothing Create a 'Nothing' variant of a maybe value
not_empty Check if a vector or data frame is empty
not_infinite Check if an object is not infinite
not_na Check if an object is not NA
not_nan Check if an object is not NaN
not_null Check if an object is not NULL
not_undefined Check if an object is not undefined
or Combine predicate functions to check if any are TRUE
perhaps Modify a function to return the value or a default value
with_default Unwrap a maybe value or return a default