Course of Raku / Functional, concurrent, reactive, and web programming / Functional programming / Data feeds / Exercises / Feed the big numbers
Solution: Feed the big numbers
Here is a possible solution to the task.
Code
(1..10) ==> grep(* > 5) ==> my @big;
say @big;🦋 You can find the source code in the file feed-evens.raku.
Output
[6 7 8 9 10]Comments
The feed sends
1..10intogrep, which keeps the numbers greater than5.The result flows into
@big, the target that ends the feed.