Skip to content
Permalink
Browse files

Fix usage to avoid neologism

Fix typo
  • Loading branch information...
coke committed Apr 15, 2019
1 parent c379f5b commit 809ee43546ecdbf52c3c4e978ff468d122006dbe
Showing with 3 additions and 3 deletions.
  1. +3 −3 doc/Language/statement-prefixes.pod6
@@ -36,8 +36,8 @@ say @array.eager; # OUTPUT: «[0 1 4]␤»
This prefix can also be used L<in front of
C<gather>|/language/control#gather/take> to make the inner statements behave
lazily; in general, any set of statements that returns a value will be lazified
using this.
lazily; in general, any set of statements that returns a value will be made
lazy using this.
=head2 X<C<eager>|eager (statement prefix)>
@@ -48,7 +48,7 @@ behind, throwing away laziness and returning the result.
my $result := eager gather { for 1..3 { say "Hey"; take $_² } };
say $result[0]; # OUTPUT: «Hey␤Hey␤Hey␤1␤»
C<gather> is L<implictly lazy when bound to a scalar|/syntax/gather%20take>.
C<gather> is L<implicitly lazy when bound to a scalar|/syntax/gather%20take>.
However, with C<eager> as a statement prefix it will run all three iterations in
the loop, as shown by the printed "Hey", even if we are just requesting the
first one in a row.

0 comments on commit 809ee43

Please sign in to comment.
You can’t perform that action at this time.