1 input stream,
seed will be used as an initial accumulation acc
❯When the input stream emits a value v:
- v and the latest acc are given to the
- the returned value will be used as the next acc
❯When the input stream completes, the output stream emits the last acc and completes
a new stream of accumulated values
Published on Monday, 12 Mar. 2018
Revised on Monday, 8 Oct. 2018
This is how a
❚ max operator would operate with an input stream:
- When the input stream completes, the output stream:
- emits the largest value emitted on the input stream
- and immediately completes
Some reactive stream libraries (eg. RxJS) provide this
❚ max operator, while others don’t. How would you code max yourself?
❚ min and
❚ max accept on optional comparer function as an argument.
Pipeable operators - Build your own with RxJS!
Freelance Developer Advocate. Motion graphics with code.
Join the Newsletter
Receive my latest news, product updates and programming visualizations. You can unsubscribe at any time.