src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> scan(BiFunction<T, T, T> accumulator) {
        ObjectHelper.requireNonNull(accumulator, "accumulator is null");
        return RxJavaPlugins.onAssembly(new ObservableScan<T>(this, accumulator));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> scan(BiFunction<T, T, T> accumulator) {
        ObjectHelper.requireNonNull(accumulator, "accumulator is null");
        return RxJavaPlugins.onAssembly(new ObservableScan<T>(this, accumulator));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > scan ( BiFunction < T , T , T > accumulator ) { ObjectHelper . requireNonNull ( accumulator , "accumulator is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableScan < T > ( this , accumulator ) ) ; }
Returns an Observable that applies a specified accumulator function to the first item emitted by a source
ObservableSource, then feeds the result of that function along with the second item emitted by the source
ObservableSource into the same function, and so on until all items have been emitted by the source ObservableSource,
emitting the result of each of these iterations.
<p>
<img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/scan.png" alt="">
<p>
This sort of function is sometimes called an accumulator.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code scan} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param accumulator
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose
result will be emitted to {@link Observer}s via {@link Observer#onNext onNext} and used in the
next accumulator call
@return an Observable that emits the results of each call to the accumulator function
@see <a href="http://reactivex.io/documentation/operators/scan.html">ReactiveX operators documentation: Scan</a>
Returns an Observable that applies a specified accumulator function to the first item emitted by a source ObservableSource then feeds the result of that function along with the second item emitted by the source ObservableSource into the same function and so on until all items have been emitted by the source ObservableSource emitting the result of each of these iterations . <p > <img width = 640 height = 320 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / scan . png alt = > <p > This sort of function is sometimes called an accumulator . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code scan } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >