getOrHandle

inline fun <L, R> Either<L, R>.getOrHandle(handler: (L) -> R): R

Gets the left value if this is Either.Right otherwise uses provided handler by providing the value from Either.Left.

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