Proof that some Maybe
is actually Just
An optional value. This can be used to represent the possibility of
failure, where a function may return a value, or not.
Transform any semigroup into a monoid by using Nothing
as the
designated neutral element and collecting the contents of the
Just
constructors using a semigroup structure on a
. This is
the behaviour in the Haskell libraries.
Convert a Maybe a
value to an a
value by providing a default a
value
in the case that the Maybe
value is Nothing
.
Decide whether a 'Maybe' is 'Just'
Convert a Maybe a
value to an a
value, using neutral
in the case
that the Maybe
value is Nothing
.
Returns Nothing
when applied to neutral
, and Just
the value otherwise.
Returns Just
the given value if the conditional is True
and Nothing
if the conditional is False
.