Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds next/last refs #2632
Added the fact that since version 6.d, the `next` or `last` command in a loop that collects its last statement values
returns `Empty` for the iterations they run on.
  • Loading branch information
ElenaMerelo committed Mar 2, 2019
1 parent 608b3e7 commit 07bafa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/Language/control.pod6
Expand Up @@ -1038,6 +1038,9 @@ while ($i < 10) {
# OUTPUT: «1 is odd.␤3 is odd.␤5 is odd.␤7 is odd.␤9 is odd.␤»
=end code
*Since version 6.d, the C<next> command in a loop that collects its last statement values
returns C<Empty> for the iterations they run on.*
=head1 X<last|control flow, last>
The C<last> command immediately exits the loop in question.
Expand Down Expand Up @@ -1073,6 +1076,9 @@ while ($i < 10) {
# OUTPUT: «The last number was 5.␤»
=end code
*Since version 6.d, the C<last> command in a loop that collects its last statement values
returns C<Empty> for the iterations they run on.*
=head1 X<redo|control flow, redo>
The C<redo> command restarts the loop block without evaluating the
Expand Down

0 comments on commit 07bafa3

Please sign in to comment.