Skip to content

Commit 2b9cbcf

Browse files
authored
Revert "Revert "Update control.pod6" (#2275)" (#2276)
This reverts commit ed1df4c.
1 parent ed1df4c commit 2b9cbcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/Language/control.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ A for loop can produce a C<List> of the values produced by each run of the
424424
attached block. To capture these values, put the for loop in parenthesis or
425425
assign them to an array:
426426
427-
(for 1, 2, 3 { $_ * 2 }).say; # says "(2 4 6)"
428-
my @a = do for 1, 2, 3 { $_ * 2 }; @a.say; # says "[2 4 6]"
429-
my @b = (for 1, 2, 3 { $_ * 2 }); @a.say; # same thing
427+
(for 1, 2, 3 { $_ * 2 }).say; # OUTPUT «(2 4 6)␤»
428+
my @a = do for 1, 2, 3 { $_ * 2 }; @a.say; # OUTPUT «[2 4 6]␤»
429+
my @b = (for 1, 2, 3 { $_ * 2 }); @b.say; # OUTPUT: «[2 4 6]␤»
430430
431431
=head1 X<gather/take|control flow,gather take>
432432

0 commit comments

Comments
 (0)