take-rw
ErrorsCollection

take-rw

Synthesised documentation from type/Mu

From type/Mu

See Original text in context

sub take-rw(\item)

Returns the given item to the enclosing gather block, without introducing a new container.

my @a = 1...3;
sub f(@list){ gather for @list { take-rw $_ } };
for f(@a{ $_++ };
say @a;
# OUTPUT: «[2 3 4]␤»