handleErrorWith
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.
inline fun <A, B, D> Ior<A, B>.handleErrorWith(combine: (B, B) -> B, f: (A) -> Ior<D, B>): Ior<D, B>
Binds the given function across Ior.Left.
Parameters
f
The function to bind across Ior.Left.
Binds the given function across Ior.Left and Ior.Both, passing the left value together with the right value accumulated so far, so the recovery itself can depend on it.
f receives None for Ior.Left and Some for Ior.Both. Unlike the overload taking combine, the result of f is returned as is, so f decides whether the existing right value is kept.