Course of Raku / Functional, concurrent, reactive, and web programming / Reactive programming / Live and on-demand supplies / Exercises
Tuning in late
Problem
Show that a live supply does not remember the past. Create a
Supplier, emit 1 before
tapping, then tap it to collect values into an array, and finally emit
2 and 3. Print the array — the value emitted
before the tap should be missing.
Example
The program prints:
[2 3]