Readonly
kindThe property that discriminates Maybe
.
Static
Readonly
singletonThe singleton instance of Nothing
.
The nothing
constant is a more accessible alias for this
object.
Compare this and that Maybe
to determine their equality.
Two Maybe
are equal if they are both Nothing
, or they are both
both Just
and their values are equal.
If this Maybe
is Just
, apply a predicate to filter its value.
If the predicate returns false
, return Nothing
.
If this Maybe
is Just
, extract its value; otherwise, return a
fallback value.
If this Maybe
is Just
, extract its value; otherwise, invoke a
function to return a fallback value.
If this Maybe
is Just
, apply a partial function to map its value.
If the function returns null
or undefined
, return Nothing
.
If this Maybe
is Just
, extract its value; otherwise, return
undefined
.
If this Maybe
is Just
, apply a function to extract its value;
otherwise, invoke a function to return a fallback value.
Generated using TypeDoc
An absent
Maybe
.