mapOrElse

inline fun <V, E, U> Result<V, E>.mapOrElse(default: (E) -> U, transform: (V) -> U): U

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