flatMap

infix inline fun <T, R> ApiResult<T>.flatMap(another: (T) -> ApiResult<R>): ApiResult<R>

Call another and if it succeeds, continue with another's result. If it fails, propagate the error. An alias for then.

See also