Course of Raku / Functional, concurrent, reactive, and web programming / Reactive programming / Live and on-demand supplies / On-demand supplies

Quiz — Supply kinds

For an on-demand supply such as Supply.from-list, what does a second tap receive?

0Nothing — the first tap used up the values
0Only the values emitted after it tapped
1The whole sequence, from the start
0An error

An on-demand supply replays its values for every tap. Each tap is independent and receives the complete sequence from the beginning — unlike a live supply, where late subscribers miss earlier values.

Course navigation

On-demand supplies   |   Live supplies