Rx.Observable.prototype.reduce(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.
For aggregation behavior with incremental intermediate results, see the scan method.
参数
accumulator(Function): An accumulator function to be invoked on each element.[seed](Any): The initial accumulator value.
返回值
(Observable): An observable sequence containing a single element with the final accumulator value.