- mapOr<T, U>(orU, mapFn, maybe): U
Returns U
- mapOr<T, U>(orU, mapFn): ((maybe: Maybe<T>) => U)
Parameters
- orU: U
- mapFn: ((t: T) => U)
Returns ((maybe: Maybe<T>) => U)
- mapOr<T, U>(orU): ((mapFn: ((t: T) => U)) => ((maybe: Maybe<T>) => U))
Returns ((mapFn: ((t: T) => U)) => ((maybe: Maybe<T>) => U))
Map over a
Maybe
instance and get out the value ifmaybe
is aJust
, or return a default value ifmaybe
is aNothing
.Examples