andThenError

fun <T> andThenError(chain: (Error) -> Result<T, Value>): Result<T, Value>

Chain two computations together for error recovery.

If a computation was a Failure, recover can chain the error data into an error recovery computation. Otherwise keep the Success.

Return

The transformed error of a Failure. Keeps the data otherwise.

Parameters

chain

Provides the transformed error