mapError

fun <T> mapError(transform: (Error) -> T): Result<T, Value>

Transform a failed result.

If a computation was a Failure, transform the error. Otherwise keep the Success.

Return

The data of a Success. The transformed error otherwise.

Parameters

transform

Provides the transformed error