src/Observable.php
public function reduce(callable $accumulator, $seed = null): Observable
    {
        return $this->lift(function () use ($accumulator, $seed) {
            return new ReduceOperator($accumulator, $seed);
        });
    }
public function reduce(callable $accumulator, $seed = null): Observable
    {
        return $this->lift(function () use ($accumulator, $seed) {
            return new ReduceOperator($accumulator, $seed);
        });
    }
public function reduce ( callable $ accumulator , $ seed = null ) : Observable { return $ this -> lift ( function ( ) use ( $ accumulator , $ seed ) { return new ReduceOperator ( $ accumulator , $ seed ) ; } ) ; }
Applies an accumulator function over an observable sequence,
returning the result of the aggregation as a single element in the result sequence.
The specified seed value is used as the initial accumulator value.

@param callable $accumulator - An accumulator function to be invoked on each element.
@param mixed $seed [optional] - The initial accumulator value.
@return Observable - An observable sequence containing a single element with the final
accumulator value.

@demo reduce/reduce.php
@demo reduce/reduce-with-seed.php
@operator
@reactivex reduce
Applies an accumulator function over an observable sequence returning the result of the aggregation as a single element in the result sequence . The specified seed value is used as the initial accumulator value .