Description Usage Arguments Format Details Value See Also Examples
One of the choice types for a Maybe monad (the other being Nothing)
1 | Just(a)
|
a |
A value of any non-null type |
Just :: a -> Maybe a
Based off the Maybe monad in Haskell and Elm but similar in construction to
the result "monad" supplied by purrr::safely(). A Maybe monad is a choice type:
it is either Just(a_value)
or it is Nothing()
. It can be used
to document optional arguments, force proper error handling, and deal with
lists/records with optional entries. It can be useful if you have a value
that is only filled in sometimes. Or if a function takes a value sometimes,
but does not absolutely need it. Or if a function would otherwise return
a NULL. The Maybe type reminds users of your code to remember to handle both
possible states: when the value exists and when it does not.
An Maybe type (a wrapper around the original value of type 'a')
Other Maybe type: Nothing
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.