| Maybe | R Documentation |
Maybe monad implementation.
Maybe monad implementation.
rhaskell::Functor -> rhaskell::Applicative -> rhaskell::Monad -> Maybe
new()Maybe$new(mValue = NULL)
mValuevalue.
Return the value. Fails if the encapsulated value is NULL! Better use fromMaybe!
isJust :: Maybe a (=self) -> a
Unwrap the value with a default.
fmap()Maybe$fmap(fun)
pure()Maybe$pure(x)
apply()Maybe$apply(x)
empty()Maybe$empty()
alt()Maybe$alt(other)
bind()Maybe$bind(fun)
fromJust()Maybe$fromJust()
fromMaybe()Maybe$fromMaybe(def)
defdefault value
fromMaybe :: a -> Maybe a (=self) -> a
Unwrap a maybe with default value and a function to apply.
maybe()Maybe$maybe(def, f)
defdefault value
ffunction to apply in case of Just() value
maybe :: a -> (a -> b) -> Maybe a (=self) -> a
Check if a Maybe is of type Just.
isJust :: Maybe a (=self) -> Bool
Check if a Maybe is of type Nothing.
isJust :: Maybe a (=self) -> Bool
clone()The objects of this class are cloneable with this method.
Maybe$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.