Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix example
  • Loading branch information
gfldex committed Aug 14, 2016
1 parent 18d98d6 commit c577eff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/Language/control.pod6
Expand Up @@ -360,12 +360,12 @@ X<|lazy list,gather>X<|lazy list,take>
C<gather> is a statement or block prefix that returns a L<sequence|/type/Seq>
of values. The values come from calls to C<take> in the dynamic scope of the C<gather> block.
my @a = gather {
my $a = gather {
take 1;
take 5;
take 42;
}
say join ', ', @a; # 1, 5, 42
say join ', ', $a; # 1, 5, 42
C<gather/take> generates values lazily, so the C<gather> block generally runs only until it hits
the first C<take>. Code after the first C<take> is executed as soon as the next value is consumed
Expand Down

0 comments on commit c577eff

Please sign in to comment.