EitherExtension<L, R> extension
Extension for the Either class.
- on
-
- Either<
L, R>
- Either<
Methods
-
left(
) → L - Returns the value of Left if available. Otherwise, a StateError is thrown.
-
leftOrNull(
) → L? -
Returns the value of Left if available. Otherwise,
null
is returned. -
right(
) → R - Returns the value of Right if available. Otherwise, a StateError is thrown.
-
rightOrNull(
) → R? -
Returns the value of Right if available. Otherwise,
null
is returned.