src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
        ObjectHelper.requireNonNull(reducer, "reducer is null");
        return RxJavaPlugins.onAssembly(new ObservableReduceMaybe<T>(this, reducer));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
        ObjectHelper.requireNonNull(reducer, "reducer is null");
        return RxJavaPlugins.onAssembly(new ObservableReduceMaybe<T>(this, reducer));
    }
Returns a Maybe 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 finite source ObservableSource,
and emits the final result from the final call to your function as its sole item.
<p>
<img width="640" height="320" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/reduce.2.png" alt="">
<p>
This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate,"
"compress," or "inject" in other programming contexts. Groovy, for instance, has an {@code inject} method
that does a similar operation on lists.
<p>
Note that this operator requires the upstream to signal {@code onComplete} for the accumulator object to
be emitted. Sources that are infinite and never complete will never emit anything through this
operator and an infinite source may lead to a fatal {@code OutOfMemoryError}.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code reduce} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param reducer
an accumulator function to be invoked on each item emitted by the source ObservableSource, whose
result will be used in the next accumulator call
@return a Maybe that emits a single item that is the result of accumulating the items emitted by
the source ObservableSource
@see <a href="http://reactivex.io/documentation/operators/reduce.html">ReactiveX operators documentation: Reduce</a>
@see <a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)">Wikipedia: Fold (higher-order function)</a>