reduce
Last updated
Last updated
reduce(accumulator: function, seed: any): Observable
💡 Just like Array.prototype.reduce()
💡 If you need the current accumulated value on each emission, try scan!
Example 1: Sum a stream of numbers
( StackBlitz | jsBin | jsFiddle )
reduce 📰 - Official docs
Scan() vs reduce() | RxJS TUTORIAL 🎥 - Academind
Build your own reduce operator 🎥 - Kwinten Pisman
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/reduce.ts