The continue statement can be used inside a given/when construct to continue to the next branch.
continue
given/when
given (10) { |i| when (10) { say "It's ten" continue } case (i.is_even) { say "It's even" continue } case (i % 5 == 0) { say "It's divisible by 5" } }
It's ten It's even It's divisible by 5
Last updated 6 years ago