mapBoth

inline fun <V, E, U> Result<V, E>.mapBoth(success: (V) -> U, failure: (E) -> U): U

Maps this Result to U by applying either the success function if this Result is Ok, or the failure function if this Result is an Err. Both of these functions must return the same type (U).