Right
Functions
Link copied to clipboard
Variant of Either.catchOrThrow constructor that allows for working with Either<Throwable, A>
by transforming or recovering from Throwable as T in the Either.Left side. This API is the same as recover. This is useful when working with results of Either.catch since this API offers a reified
variant.
Link copied to clipboard
inline fun <A, B> Either<A, B>.combine(other: Either<A, B>, combineLeft: (A, A) -> A, combineRight: (B, B) -> B): Either<A, B>
Combine two Either values. If both are Right then combine both B values using combineRight or if both are Left then combine both A values using combineLeft, otherwise return the sole Left value (either this
or other).
Link copied to clipboard
Link copied to clipboard
Returns the unwrapped value B of Either.Right or null
if it is Either.Left.
Link copied to clipboard
Link copied to clipboard
Returns the unwrapped value A of Either.Left or null
if it is Either.Right.
Link copied to clipboard