Skip to content

Commit c577eff

Browse files
committed
fix example
1 parent 18d98d6 commit c577eff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Language/control.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@ X<|lazy list,gather>X<|lazy list,take>
360360
C<gather> is a statement or block prefix that returns a L<sequence|/type/Seq>
361361
of values. The values come from calls to C<take> in the dynamic scope of the C<gather> block.
362362
363-
my @a = gather {
363+
my $a = gather {
364364
take 1;
365365
take 5;
366366
take 42;
367367
}
368-
say join ', ', @a; # 1, 5, 42
368+
say join ', ', $a; # 1, 5, 42
369369
370370
C<gather/take> generates values lazily, so the C<gather> block generally runs only until it hits
371371
the first C<take>. Code after the first C<take> is executed as soon as the next value is consumed

0 commit comments

Comments
 (0)