3 ms·
One solution would be to borrow from Perl. You make a do block that executes once unless continued, and allow conditions on break and continue: do:
by ben509 7y ago
One solution would be to borrow from Perl. You make a do block that executes once unless continued, and allow conditions on break and continue:
do:
thing()
thing()
continue if condition
And you can now express "skip ahead" with a `break if X` as well.
- adrianratnapala 7y agoYes, although you don't have to be so perlish as to do the if in that order do: thing() thing() if condition: continue