Course of Raku / Functional, concurrent, reactive, and web programming / Reactive programming / Supplies / Exercises / Tap a list
Solution: Tap a list
Here is a possible solution to the task.
Code
Supply.from-list('red', 'green', 'blue').tap(-> $v { say $v });🦋 You can find the source code in the file tap-a-list.raku.
Output
red
green
blueComments
Supply.from-listemits the three strings in order.The tap runs once for each, printing it.
Course navigation
← Tap a list | Filter a supply →