Transforms a maybe value by using the specified mapping function.
((a) -> b, maybe<a>) -> maybe<b>
f : (a) -> b | The mapping function |
maybeVal : maybe<a> | The maybe value |
The transformed maybe value.
Returns the value associated with the maybe or crashes the program.
(maybe<a>) -> a
maybeVal : maybe<a> | The maybe value |
The value inside of the maybe.
Returns true if the maybe value is not nothing
(maybe<a>) -> bool
maybeVal : maybe<a> | The maybe value |
true if the maybe value is not nothing, false otherwise
Returns true if the maybe value is nothing
(maybe<a>) -> bool
maybeVal : maybe<a> | The maybe value |
true if the maybe value is nothing, false otherwise.
Returns 0 if the maybe value is nothing, 1 otherwise
(maybe<a>) -> uint8
maybeVal : maybe<a> | The maybe value |
The number of items stored in the count
Evaluates the equivalent of List:fold for a maybe
((t, state) -> state, state, maybe<t>) -> state
f : (t, state) -> state | The folding function |
initState : state | The initial state |
maybeVal : maybe<t> | The maybe value |
The final state returned by f, or initState if the maybe was nothing()
Executes a function for a maybe value for the purpose of a side effect.
((a) -> unit, maybe<a>) -> unit
f : (a) -> unit | The function to apply to the value |
maybeVal : maybe<a> | The maybe value |
unit