src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Flowable<R> scanWith(Callable<R> seedSupplier, BiFunction<R, ? super T, R> accumulator) {
        ObjectHelper.requireNonNull(seedSupplier, "seedSupplier is null");
        ObjectHelper.requireNonNull(accumulator, "accumulator is null");
        return RxJavaPlugins.onAssembly(new FlowableScanSeed<T, R>(this, seedSupplier, accumulator));
    }
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <R> Flowable<R> scanWith(Callable<R> seedSupplier, BiFunction<R, ? super T, R> accumulator) {
        ObjectHelper.requireNonNull(seedSupplier, "seedSupplier is null");
        ObjectHelper.requireNonNull(accumulator, "accumulator is null");
        return RxJavaPlugins.onAssembly(new FlowableScanSeed<T, R>(this, seedSupplier, accumulator));
    }
Returns a Flowable that applies a specified accumulator function to the first item emitted by a source
Publisher and a seed value, then feeds the result of that function along with the second item emitted by
the source Publisher into the same function, and so on until all items have been emitted by the source
Publisher, 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/scanSeed.png" alt="">
<p>
This sort of function is sometimes called an accumulator.
<p>
Note that the Publisher that results from this method will emit the value returned by
the {@code seedSupplier} as its first item.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors downstream backpressure and expects the source {@code Publisher} to honor backpressure as well.
Violating this expectation, a {@code MissingBackpressureException} <em>may</em> get signaled somewhere downstream.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code scanWith} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <R> the initial, accumulator and result type
@param seedSupplier
a Callable that returns the initial (seed) accumulator item for each individual Subscriber
@param accumulator
an accumulator function to be invoked on each item emitted by the source Publisher, whose
result will be emitted to {@link Subscriber}s via {@link Subscriber#onNext onNext} and used in the
next accumulator call
@return a Flowable that emits {@code initialValue} followed by the results of each call to the
accumulator function
@see <a href="http://reactivex.io/documentation/operators/scan.html">ReactiveX operators documentation: Scan</a>