andThen

open fun <T, R> Result<T>.andThen(onSuccess: @Composable (T) -> Result<R>): Result<R>

Convenience to chain the result of one Result into another, forwarding loading and error states, and mapping the success to another Result.

Parameters

onSuccess

The mapping function to apply to a Success result.