{"atom":"regression/missing-routines-batch","family":"regression","slug":"missing-routines-batch","header":{"atom":"regression/missing-routines-batch","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/missing-routines-batch.raku","counts":{"a":1,"f":0,"d":0,"c":0,"r":0,"n":0},"files":["atoms/regression/missing-routines-batch.grid"],"records":[["0001","","# Regression: a batch of routines the documentation demonstrates that had no\n# implementation, so every example touching them died on dispatch.\n#   * the POSITIONAL PROTOCOL spelled out — `.AT-POS`, `.EXISTS-POS`, `.slice` —\n#     answered by a Range as the list it stands for, and by an Array/List too.\n#   * `$range.in-range($v)` is True inside the range, and otherwise THROWS\n#     X::OutOfRange naming the offending value. Rakudo throws here rather than\n#     handing back a soft Failure — even `.defined` on the result explodes.\n#   * the ROLE coercers `.Setty`/`.Baggy`/`.Mixy` name the immutable member of\n#     each QuantHash family.\n#   * a Code is a one-element list for `.kv`/`.pairs`/`.keys`/`.values`, and a\n#     NAMED routine gists as its `&`-reference rather than a generic `sub {…}`.\n#   * `Date.new-from-daycount`, `.first-date-in-month`, `Instant.to-posix`.\n#   * `.subst-mutate` substitutes IN PLACE and answers the Match — it needs the\n#     invocant's slot, so it cannot live in the value-only method dispatcher.\n#   * the `comb($matcher, $input)` SUB, whose arguments are the other way round\n#     from the method.\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\n# the positional protocol\ncheck((1..5).AT-POS(2),        '3',     'at-pos-on-a-range');\ncheck(<a b c>.AT-POS(1),       'b',     'at-pos-on-a-list');\ncheck((1..5).EXISTS-POS(2),    'True',  'exists-pos-inside');\ncheck((1..5).EXISTS-POS(9),    'False', 'exists-pos-outside');\ncheck((1..10).slice(2,4).gist, '(3 5)', 'slice-of-a-range');\ncheck(<a b c d>.slice(0,2).gist, '(a c)', 'slice-of-a-list');\ncheck((1,2,3).Seq.slice(0,2).gist, '(1 3)', 'slice-of-a-seq');\n# these already worked and must keep working\ncheck((1..5).antipairs.gist, '(1 => 0 2 => 1 3 => 2 4 => 3 5 => 4)', 'antipairs-of-a-range');\ncheck((1..5).reduce(&[+]),   '15',      'reduce-over-a-range');\n\n# .in-range\ncheck((1..5).in-range(3),          'True',    'in-range-inside');\ncheck((try (1..5).in-range(9)).defined, 'False', 'in-range-outside-throws');\ntry { (1..5).in-range(9) };\ncheck($!.^name, 'X::OutOfRange', 'and-it-is-an-out-of-range');\n\n# the QuantHash role coercers\ncheck(Set.new(1,2).Baggy.^name, 'Bag', 'set-to-baggy');\ncheck(Set.new(1,2).Mixy.^name,  'Mix', 'set-to-mixy');\ncheck(Bag.new(1,2).Setty.^name, 'Set', 'bag-to-setty');\ncheck(Set.new(1,2).Set.^name,   'Set', 'set-to-set-is-unchanged');\n\n# a Code as a one-element list, and how a named routine gists\ncheck((&say).kv.gist,        '(0 &say)', 'kv-of-a-code');\ncheck(&say.gist,             '&say',     'a-named-sub-gists-as-its-reference');\ncheck(&[+].gist,             '&infix:<+>', 'an-operator-too');\nsub named-thing { 42 }\ncheck(&named-thing.gist,     '&named-thing', 'a-user-sub');\ncheck((1,2).Capture.Capture.gist, '\\(1, 2)', 'capture-of-a-capture-is-itself');\n\n# Date / Instant\ncheck(Date.new(2016,6,3).first-date-in-month.Str, '2016-06-01', 'first-date-in-month');\ncheck(Date.new(2016,6,3).last-date-in-month.Str,  '2016-06-30', 'last-date-in-month');\ncheck(Date.new-from-daycount(49700).Str,          '1994-12-14', 'new-from-daycount');\ncheck(Instant.from-posix(1).to-posix.gist,        '(1 False)',  'instant-to-posix');\n\n# .subst-mutate\nmy $some-string = \"Some foo\";\nmy $match = $some-string.subst-mutate(/foo/, \"string\");\ncheck($some-string,  'Some string', 'subst-mutate-changes-the-invocant');\ncheck($match.Str,    'foo',         'and-answers-the-match');\nmy $t = \"aeiou\";\n$t.subst-mutate(/<[oe]>/, '', :g);\ncheck($t,            'aiu',         'subst-mutate-takes-adverbs');\n\n# the comb sub\ncheck(comb(/a/, \"banana\").gist,          '(a a a)',           'the-comb-sub');\ncheck(comb(3, [3,33,333,3333]).join('*'), '3 3*3 3*33 *333*3', 'comb-with-a-chunk-size');\ncheck(\"banana\".comb(/a/).gist,           '(a a a)',           'the-comb-method-is-unchanged');\n\nif @fail { note \"FAILED: @fail.join('; ')\"; say 'FAIL' } else { say 'PASS' }","output PASS","a",["PASS","PASS"],0,[["budget","20s"]]]]}