getOrElse

fun <L, R> Either<L, R>.getOrElse(value: R): R

Returns the value from this Right or the given argument if this is a Left. Right(12).getOrElse(17) RETURNS 12 and Left(12).getOrElse(17) RETURNS 17