DEV Community

Discussion on: Loops in Raku and when to use them

Collapse
 
epsi profile image
E.R. Nurwijayadi

Good article. Thank you for posting.

This Raku approach remind me of generator/yield pattern.

I'm a beginner in Raku. To help more beginner, I have made a working example of this gather take pattern. And then continue to concurrency with channel.

🕷 epsi.bitbucket.io/lambda/2021/03/0...

First the data structure

Data Structure: Songs Records in List of Hashes

Then we can bundle the gather-take in a producer function. Raku takes short code to solve this unique challenge.

Gather and Take

I hope this could help other who seeks for other case example.

🙏🏽

Thank you for posting with general introduction.

Collapse
 
jj profile image
Juan Julián Merelo Guervós

Amazing! Thanks a lot.