{"atom":"regression/rotor-sub-6e","family":"regression","slug":"rotor-sub-6e","header":{"atom":"regression/rotor-sub-6e","kind":"whole-program — a minimal repro, not yet reduced to an atom","source":"curated"},"axes":null,"cols":null,"engines":["rakudo-2026.07","rakupp-3.14.0"],"kinds":["ref","pp"],"defFrom":"rakupp:t/regression/rotor-sub-6e.raku","counts":{"a":1,"f":0,"d":0,"c":0,"r":0,"n":0},"files":["atoms/regression/rotor-sub-6e.grid"],"records":[["0001","","use v6.e.PREVIEW;\n# Regression: the 6.e `rotor` SUB takes the cycle FIRST and the iterable LAST —\n# the opposite way round from the method. Every positional was being swept into\n# the list, so `rotor(3, 'a'..'h')` rotored the cycle along with the data. The\n# iterable is the last POSITIONAL, not the last argument, because `:partial` may\n# come after it.\n#\n# This lives in its own file because the sub form only exists under 6.e, and the\n# pragma has to be at file scope — Rakudo does not honour it inside an EVAL.\n# Contract: exit 0 + last line PASS.\nmy @fail;\nsub check($got, $want, $what) { @fail.push(\"$what: got $got want $want\") unless $got eq $want }\n\ncheck(rotor(3, 'a'..'h').join('|'),       'a b c|d e f',   'the cycle comes first');\ncheck(rotor(2, 1..7).join('|'),           '1 2|3 4|5 6',   'and the iterable last');\ncheck(rotor(2, 1..7, :partial).join('|'), '1 2|3 4|5 6|7', ':partial may come after it');\ncheck(rotor(2 => 1, 1..6).join('|'),      '1 2|4 5',       'a Pair cycle works too');\ncheck((1..7).rotor(2).join('|'),          '1 2|3 4|5 6',   'the method is unchanged');\n\nif @fail { note \"FAILED: @fail.join('; ')\"; say 'FAIL' } else { say 'PASS' }","output PASS","a",["PASS","PASS"],0,[["budget","20s"]]]]}