Episode 26 - How
❚ max works
Monday, 17 Mar.
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?
Watch the solution below.
❚ min and
❚ max accept on optional comparer function as an argument.