onFailure

inline fun <D, E> Result<D, E>.onFailure(action: (E) -> Unit): Result<D, E>

Run action on failure, returning the receiver for chaining.