andThen

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

Return

The new Result.

Author

Jan Müller

Parameters

<receiver>
The source Result.
T
The source type.
transformation
The transformation operation. Can be used to turn into Result.Failures.
U
The target type.
suspend fun <T : Any, U : Any> Result<T>.andThen(transformation: SuspendFunction1<T, Result<U>>): Result<U>