recoverUnless

inline fun <V, E> Result<V, E>.recoverUnless(predicate: (E) -> Boolean, transform: (E) -> V): Result<V, E>

Returns the transformation of the error if this Result is Err and does not satisfy the given predicate, otherwise this Result.