combineCompleted¶
fun <Failure, Value> Iterable<ProgressiveOutcome<Failure, Value>>.combineCompleted(): Iterable<ProgressiveOutcome<Failure, Value>>
Replaces incomplete outcomes by the previous completed outcome, with the updated progress information.
For example, if the incoming iterable contains:
then this method returns:
You can see how the last incomplete value has been transformed into a loading success. The same transformation is applied to failures.
This operator is useful when the iterable represents changes to a single value over time: when we receive an incomplete event, we merge it with the previous complete event to still display a value. For example, in a UI, this would allow displaying old values while refresh requests are ongoing.
fun <Failure, Value> Sequence<ProgressiveOutcome<Failure, Value>>.combineCompleted(): Sequence<ProgressiveOutcome<Failure, Value>>
Replaces incomplete outcomes by the previous completed outcome, with the updated progress information.
For example, if the incoming sequence contains:
then this method returns:
You can see how the last incomplete value has been transformed into a loading success. The same transformation is applied to failures.
This operator is useful when the iterable represents changes to a single value over time: when we receive an incomplete event, we merge it with the previous complete event to still display a value. For example, in a UI, this would allow displaying old values while refresh requests are ongoing.