concept aggregate in category rxjs

This is an excerpt from Manning's book RxJS in Action.
Sometimes you aren’t interested in acting on each item in a collection in isolation; sometimes you want to look at the collection in aggregate rather than piecemeal. For instance, suppose you want to take the average value of a collection of numbers or you want to turn a sequence into a mathematical series. This type of operation is called a reduction or an aggregation, with the result as a single value output instead of another collection. Once again, arrays come with a built-in reduce operator for this purpose,[3] and observables follow suit. reduce is a bit more involved than the other two; here’s the function signature:
One principle of FP is the ability to construct lazy function chains. In this section, we’ll show you how to mix and match the main observable operators you just learned about together with a few other functions known as aggregates. Aggregate functions let you do useful things like keeping track of a running total, taking only a subset of the total set of data, returning default values, and others. Some functional libraries you might have heard of or used before, such as Lodash.js and Underscore.js, have ample support for this. First, it’s important to understand that observable sequences must be self-contained.