- mapOrElse<T, U>(orElseFn, mapFn, maybe): U
Parameters
- orElseFn: (() => U)
- mapFn: ((t: T) => U)
- maybe: Maybe<T>
Returns U
- mapOrElse<T, U>(orElseFn, mapFn): ((maybe: Maybe<T>) => U)
Parameters
- orElseFn: (() => U)
- mapFn: ((t: T) => U)
Returns ((maybe: Maybe<T>) => U)
- mapOrElse<T, U>(orElseFn): ((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 use a function to construct a default value ifmaybe
isNothing
.Examples