EitherExtension<L, R> extension

Extension for the Either class.

on

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.
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.