Class OperatorScan<R,T>

java.lang.Object
rx.internal.operators.OperatorScan<R,T>
Type Parameters:
R - the aggregate and output type
T - the input value type
All Implemented Interfaces:
Func1<Subscriber<? super R>,Subscriber<? super T>>, Function, Observable.Operator<R,T>

public final class OperatorScan<R,T> extends Object implements Observable.Operator<R,T>
Returns an Observable that applies a function to the first item emitted by a source Observable, then feeds the result of that function along with the second item emitted by an Observable into the same function, and so on until all items have been emitted by the source Observable, emitting the result of each of these iterations.

This sort of function is sometimes called an accumulator.

Note that when you pass a seed to scan the resulting Observable will emit that seed as its first emitted item.