Value capture
All blocks are anonymous closures in Raku, and parameters are lexicals, so it's easy to generate a list of them. We'll use a gather
/take
generator loop, and call the closures in random order, just to keep things interesting.
Output:
Or equivalently, using a more functional notation:
Last updated