We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b565ab commit b373bcfCopy full SHA for b373bcf
doc/Type/Mu.pod6
@@ -337,6 +337,18 @@ Takes the given item and passes it to the enclosing C<gather> block.
337
take (1 .. $max-lotto-numbers).pick(1);
338
}.say; #-> 32 22 1 17 32 9 (for example)
339
340
+=head2 routine take-rw
341
+
342
+ sub take-rw(\item)
343
344
+Returns the given item to the enclosing C<gather> block, without introducing a new container.
345
346
+ my @a = 1...3;
347
+ sub f(@list){ gather for @list { take-rw $_ } };
348
+ for f(@a) { $_++ };
349
+ say @a;
350
+ # OUTPUT«[2 3 4]»
351
352
=head2 method so
353
354
method so()
0 commit comments