The reduce operator

The reduce function takes an instance of the BiFunction type, which contains the apply function, taking two values and returning a single one. The this operator can be used to combine all items from the upstream into a single value, as follows:

The preceding diagram shows that the upstream contains two values, and the reduce function passes a sum of them to the downstream.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.3.175