getOrThrow

fun <L : Throwable, R> Either<L, R>.getOrThrow(): R

Gets the left value if this is Either.Right otherwise throws from Either.Left.

Important: This is a Public Preview API. It may be changed or removed at any time.