The maybe
if it is Just
, or the Maybe
returned by elseFn
if the maybe
is Nothing
.
Like or
, but using a function to construct the alternative
Maybe
.
Sometimes you need to perform an operation using other data in the environment
to construct the fallback value. In these situations, you can pass a function
(which may be a closure) as the elseFn
to generate the fallback Maybe<T>
.
Useful for transforming empty scenarios based on values in context.
The maybe
if it is Just
, or the Maybe
returned by elseFn
if the maybe
is Nothing
.
Like
or
, but using a function to construct the alternativeMaybe
.Sometimes you need to perform an operation using other data in the environment to construct the fallback value. In these situations, you can pass a function (which may be a closure) as the
elseFn
to generate the fallbackMaybe<T>
.Useful for transforming empty scenarios based on values in context.