In Control flow§

See primary documentation in context for redo

The redo command restarts the loop block without evaluating the conditional again.

for 1..5 -> $current-level {
    state $total-attempts = 0;
    $total-attempts++;
    print("Entering #$current-level");
    if $total-attempts %% 3 {
        redo;
    }
}
# OUTPUT: «Entering #1... Entering #2... Entering #3... Entering #3... Entering #4... Entering #5... Entering #5... »