map

inline suspend fun <T, R> Outcome<T>.map(transform: suspend (T) -> R): Outcome<R>

Maps the value of a successful Outcome using the provided transform function.

Return

A new Outcome with the transformed value if successful, or the original Failure.

Parameters

transform

The function to transform the value of a Success.