EnsureNotNullEitherEffectExtension<L> extension
Provide ensureNotNull extension on EitherEffect.
- on
-
- EitherEffect<
L>
- EitherEffect<
Methods
-
ensureNotNull<
R extends Object> (R? value, L orLeft()) → R -
Ensures that
value
is not null. When the value is not null, then it will be returned as non null and the check value is now smart-checked to non-null. Otherwise, if thevalue
is null then theEither.binding(...)
will short-circuit withorLeft
inside of Left.