handleErrorWith

fun <A, B, C> Either<A, B>.handleErrorWith(f: (A) -> Either<C, B>): Either<C, B>

Binds the given function across Left, that is, Map, or transform, the left value A of this Either into a new Either with a left value of type C. Returns a new Either with either the original right value of type B or the newly transformed left value of type C.

Parameters

f

The function to bind across Left.