Skip to content

Commit

Permalink
Fix typo: comsuming -> consuming
Browse files Browse the repository at this point in the history
  • Loading branch information
kjkuan committed May 9, 2019
1 parent d19c977 commit f4004e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/Type/Seq.pod6
Expand Up @@ -15,11 +15,11 @@ iterated during the assignment:
=begin code
# The Seq created by gather ... take is consumed on the spot here.
my @a = gather do { say 'consuming...'; take 'one' }; # OUTPUT: «comsuming...␤»
my @a = gather do { say 'consuming...'; take 'one' }; # OUTPUT: «consuming...␤»
# The Seq here is only consumed as we iterate over @a later.
my @a = lazy gather do { say 'consuming...'; take 'one' }; # outputs nothing.
.say for @a; # OUTPUT: «comsuming...␤one␤»
.say for @a; # OUTPUT: «consuming...␤one␤»
=end code
A typical use case is L<method C<lines> in C<IO::Handle>|/type/IO::Handle#method_lines>,
Expand Down

0 comments on commit f4004e4

Please sign in to comment.