Skip to content

Commit 4488e4e

Browse files
committed
List repeat {} while/until in 5to6 nutshell
Related to #688
1 parent 5621797 commit 4488e4e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,27 @@ loop using the C<.lines> method.
751751
while (<IN_FH>) { } # Perl 5
752752
for $IN_FH.lines { } # Perl 6
753753
754+
=head3 C<do> C<while>/C<until>
755+
756+
do {
757+
...
758+
} while $x < 10;
759+
760+
do {
761+
...
762+
} until $x >= 10;
763+
764+
The construct is still present, but C<do> was renamed to C<repeat>, to better
765+
represent what the construct does:
766+
767+
repeat {
768+
...
769+
} while $x < 10;
770+
771+
repeat {
772+
...
773+
} until $x >= 10;
774+
754775
=head3 C<for> C<foreach>
755776
756777
Note first this common misunderstanding about the C<for> and C<foreach>

0 commit comments

Comments
 (0)