withResult

Consumes the data of Results if they are Result.Successes.

Return

The identity of the Result.

Author

Jan Müller

Parameters

<receiver>
The source Result.
consumer
The consuming operation.
T
The source type.
suspend fun <T : Any> Result<T>.withResult(consumer: SuspendFunction1<T, Unit>): Result<T>