Raku Cases › Hashes & sets

Hashes & sets

Hash, Map, Pair, object hashes, and the Set, Bag and Mix family.

111 rules from 73 tests. 69 of those tests are confirmed on both engines: Raku++ and Rakudo 2026.11 both pass, or Raku++ gives Rakudo's answer on every probe of a family. The verdict is the test's, not each rule's. How to read a case.

6e-gatingRaku++ passesRakudo cannot run it2026-08-19 · 387d2c88
  1. 6

    From 6.e %h{**} walks to the leaves of a nested hash; before 6.e ** is a missing key.

    with %h = A => { B => 1, C => 2 }, D => 3, %h{**} is (1, 2, 3) under 6.e and Any under 6.d

  2. 7

    A hash multislice selecting one value returns the value itself from 6.e and a one-element list before.

    %h{'A';'B'} is 42 under 6.e and (42,) under 6.d

  3. 18

    From 6.e an object hash declared without a value type has value type Mu; before 6.e it is Any.

    my %h{Str}; %h.of.^name is Mu under 6.e and Any under 6.d

More from this test: Dates & times (2), Exceptions & control flow (1), I/O & processes (2), Lists & laziness (8), Numerics (1), Classes, roles & the MOP (2), Operators (1), Everything else (2), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Strings & Unicode (6), divergences (1).

anton-batch-round2Raku++ passesRakudo passes2026-08-28 · 2421c094
  1. 1

    Set membership with (elem)/(cont) is an identity question: a Str, a Rat or an allomorph is not an element where the Int is.

    '123' (elem) [123] is False; <42> (elem) [42] is False; 123 (elem) [123] is True

  2. 2

    For a Hash operand of (elem) the keys are the elements, not the values.

    'a' (elem) {a => 42} is True; 42 (elem) {a => 42} is False

  3. 3

    .pick on a Set returns an element with the type it went in with.

    set(1,2).pick.WHAT.^name is Int

More from this test: Native types & NativeCall (1), Classes, roles & the MOP (2), Regexes & grammars (3), Signatures & dispatch (1).

array-op-args-getc-get-and-friendsRaku++ passesRakudo passes2026-09-17 · 2e994990
  1. 5

    %h.append onto a key whose value is a List turns that slot into an Array.

More from this test: Compile-time errors (1), I/O & processes (1), Numerics (1), Classes, roles & the MOP (1), Signatures & dispatch (2).

assoc-index-on-scalar-diesRaku++ passesRakudo passes2026-08-24 · f8b6f8c3
  1. 1

    Associative indexing on a defined non-Associative value dies with "Type Str does not support associative indexing." (naming the value's type).

    $str<key> dies

More from this test: Syntax & parsing (1).

async-socket-tapsRaku++ passesRakudo passes2026-09-12 · b4675bca
  1. 4

    .keys of an object-keyed hash returns the original key objects, not their stringifications. inferred

More from this test: Concurrency (4).

audited-language-gaps-1Raku++ passesRakudo passes2026-10-04 · 76f5426d
  1. 10

    BagHash.add counts each item it is given.

More from this test: Concurrency (1), Containers & assignment (1), Exceptions & control flow (1), Lists & laziness (2), Operators (1), Regexes & grammars (2), Signatures & dispatch (3), Syntax & parsing (2).

audited-language-gaps-3Raku++ passesRakudo passes2026-10-04 · 74895f1e
  1. 2

    The key of $item => … is decontainerized.

More from this test: I/O & processes (1), Lists & laziness (1), Native types & NativeCall (1), Strings & Unicode (1).

audited-language-gaps-4Raku++ passesRakudo passes2026-10-05 · f3b1fe01
  1. 2

    .BIND-KEY($k, EXPR) evaluates EXPR once.

More from this test: Compile-time errors (1), Classes, roles & the MOP (1), Everything else (2).

battery-regressions-v5Raku++ passesRakudo passes2026-09-29 · 78d68426
  1. 4

    self = … in a method called on a Hash is a store into that Hash.

More from this test: I/O & processes (1), Modules (2), Classes, roles & the MOP (1), Operators (1), Regexes & grammars (1), Signatures & dispatch (2).

blob-numeric-and-zip-metaopRaku++ passesRakudo passes2026-07-29 · 8c793652
  1. 5

    A key produced by Z=> keeps its type rather than being stringified. inferred

More from this test: Lists & laziness (1), Operators (1), Types & coercion (2).

bson-simple-and-hash-agnosticRaku++ passesRakudo passes2026-08-31 · 2d04edb3
  1. 13

    A class that implements the Associative protocol (AT-KEY, EXISTS-KEY, keys), even through a composed role, supports the subscript adverbs :v and :k and the zen and whatever slices.

    $a{<x y>}:k gives the keys x, y

More from this test: Containers & assignment (4), Dates & times (1), Modules (1), Classes, roles & the MOP (2), Operators (1), Signatures & dispatch (2), Stringification (1), Strings & Unicode (1), Types & coercion (1).

coercing-return-typeRaku++ passesRakudo passes2026-09-11 · cc95e49f
  1. 2

    .Map on a Pair or list of Pairs answers a Map, not a Hash.

    (a => 1).Map is a Map

More from this test: Signatures & dispatch (1).

coercion-typed-element-storesRaku++ passesRakudo passes2026-10-11 · b21ea7a6
  1. 2

    Hash.append onto an existing key makes [|old, |new] and Hash.push makes [old, new].

  2. 3

    A Hash given to Hash.append or Hash.push slips into its pairs, so the two hashes merge key by key.

    my Hash() %options = %defaults; %options.append: %o merges %o into %options

More from this test: Types & coercion (1).

conformance-phase1-reprRaku++ passesRakudo passes2026-07-25 · 970de58d
  1. 3

    A Pair has .antipairs and .invert: a list value inverts to one pair per element, and the inverted keys keep their type.

More from this test: Lists & laziness (2), Signatures & dispatch (1), Stringification (2), Types & coercion (1).

conformance-phase2-introspectionRaku++ passesRakudo passes2026-07-25 · 5103b4d7
  1. 5

    A QuantHash has a typed element default — False for the Set family, 0 for the weighted kinds — not Any.

More from this test: Containers & assignment (1), Exceptions & control flow (2), I/O & processes (1), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (2), Types & coercion (1).

container-lists-and-pair-cellsRaku++ passesRakudo passes2026-09-27 · a77dd764
  1. 5

    The Pairs a Set hands out are read-only: assigning to .value of one dies.

More from this test: Containers & assignment (4), Signatures & dispatch (1).

container-raku-of-tagged-valuesRaku++ passesRakudo passes2026-11-27 · d6b52331
  1. 2

    A Pair keeps a Version, IO::Path or Buf key as what it is, not as its string.

    the key of v1.2 => 1 is a Version, not the Str "1.2"

More from this test: Stringification (2).

cro-family-clusterRaku++ passesRakudo passes2026-07-23 · d7b9d40e
  1. 5

    %( $hash, pair ) merges the hash's entries with the pair instead of treating the hash as a key.

More from this test: Lists & laziness (1), Classes, roles & the MOP (2), Regexes & grammars (3), Syntax & parsing (2).

ecosweep-batch-fiveRaku++ passesRakudo passes2026-08-25 · 6879a71b
  1. 10

    An object hash with a smiley key constraint, %c{Any:U}, keeps type-object keys distinct, and an enum type object used as a subscript is one key, not a slice.

    my %by-type{Any:U} = (Pair.new(Flavor, 'f'), Pair.new(Order, 'o')); %by-type{Order} is o

More from this test: Native types & NativeCall (2), Classes, roles & the MOP (2), Operators (1), Regexes & grammars (1), Scoping & phasers (2), Signatures & dispatch (4), Syntax & parsing (1), Types & coercion (2).

ecosweep-batch-threeRaku++ passesRakudo passes2026-08-24 · 298866e3
  1. 3

    %h{$k} //= RHS leaves no key behind when RHS throws.

    try { %h<boom> //= die 'no' } leaves %h.elems at 0

More from this test: Native types & NativeCall (3), Classes, roles & the MOP (1).

engine-objects-list-as-oneRaku++ passesRakudo passes2026-10-27 · 50aebf54
  1. 2

    A Set, Bag or Mix bound to a $ parameter or loop variable is one item, as a Hash is.

More from this test: Lists & laziness (1).

error-messages-rakudo-settledRaku++ passesRakudo passes2026-11-14 · 13902c52 · rakudo#2109
  1. 2

    MixHash.grab returns a Failure whose message is ".grab is not supported on a MixHash". inferred

    MixHash.new(<a b c>).grab is a Failure

More from this test: Exceptions & control flow (2), I/O & processes (1), divergences (1).

exe-pair-key-and-adverbsRaku++ passesRakudo passes2026-11-11 · cf7816b6
  1. 2

    A Pair is associative on its one key, so $pair<a>:exists is True for a Pair whose key is a.

More from this test: Containers & assignment (1), Types & coercion (1).

exe-value-semanticsRaku++ passesRakudo passes2026-11-11 · 090426b0
  1. 7

    A missing Hash key or Array index reads as (Any), a Set's missing key as False, a Bag's as 0, and a List's or Map's missing element as Nil.

    %h<missing> and @a[99] are (Any)

  2. 8

    An associative subscript on an undefined scalar or on a type object reads as (Any).

    my $u; $u<k> and Str<k> are (Any)

More from this test: Containers & assignment (1), Lists & laziness (1), Regexes & grammars (1), Signatures & dispatch (1), Types & coercion (1).

flipflop-and-nil-termRaku++ passesRakudo passes2026-07-28 · ccc187ec
  1. 4

    A bare Nil operand of a set operator is kept as an element, as a Nil inside a list is.

    Nil (|) 1 keeps the Nil

More from this test: Operators (2), Syntax & parsing (1).

grand-review-c2-methodsRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 9

    Hash.new and .hash given an odd number of non-Pair elements die.

    Hash.new(1, 2, 3) and (1, 2, 3).hash die

More from this test: I/O & processes (6), Lists & laziness (1), Numerics (4), Everything else (1), Strings & Unicode (3).

hash-classify-list-and-defaultsRaku++ passesRakudo passes2026-07-26 · f78b6251
  1. 1

    %h.classify-list($mapper, *@values) files the values into the invocant and returns it, and a list-valued key nests.

    a key ("1a","1b") files under %h<1a><1b>

  2. 2

    %h.categorize-list files each value under every key the mapper yields.

More from this test: Containers & assignment (1).

hash-map-pair-semantics-sheetRaku++ passesRakudo passes2026-09-20 · ed688ad6
  1. 1

    Storing an odd number of items into a Hash, by assignment, %( ), Hash.new or .Hash, throws X::Hash::Store::OddNumber, whose .found counts two per key stored plus the stray item and whose .last is the leftover. inferred

    my %h = 1, 2, 3 throws with .found 3 and .last 3

  2. 2

    In a list stored into a Hash, a Map merges its pairs as a Hash does, while a Set stays one item used as a key. inferred

    my %m = (c => 1, d => 2).Map, e => 3 has keys c, d and e

  3. 3

    A lone Callable assigned to a Hash dies with a message starting "Cannot use a Callable as the only argument to store in a Hash". inferred

    my %h = { $_ } dies

  4. 4

    An undefined hash key stringifies to the empty string with a warning, and an undefined topic smartmatched against a Hash is False with a warning. inferred

    %h{Any} = 1 warns and stores under ""

  5. 5

    An object hash keeps its keys as objects of their own type, so 1 and "1" are different keys, and a key of the wrong type is refused with X::TypeCheck::Binding::Parameter. inferred

    for my %h{Int} = 1 => "a", %h{1}:exists is True and %h<1>:exists is False

  6. 6

    The :{ } composer builds an object hash keyed on Mu, whose .raku is a declaration. inferred

    :{ 1 => "a" }.raku is (my Mu %{Mu} = 1 => "a")

  7. 7

    An unitemized aggregate used as an object-hash subscript is a slice, not one key. inferred

    my %h{Any}; %h{[1, 2]} = "a" makes two entries

  8. 10

    Clashing subscript adverbs answer a Failure carrying X::Adverb whose .nogo names them, :exists:kv and :exists:p are legal, and an unknown adverb on a hash subscript throws X::Adverb. inferred

    %h<a b>:exists:k is a Failure whose exception .nogo is ("exists", "k")

  9. 14

    A Map is immutable: assigning to a key dies with "Cannot change key 'a' in an immutable Map" or "Cannot add key 'c' to an immutable Map", :delete dies, binding an element throws X::Bind, and there is no .default. inferred

    Map.new((a => 1, b => 2))<a> = 2 dies with Cannot change key 'a' in an immutable Map

  10. 15

    A missing key in a Map reads as Nil, in a slice too, and reading it does not create it. inferred

    Map.new((a => 1, b => 2))<a z> is (1, Nil)

  11. 17

    .contains on a Map tests the Map's Str form and warns that it did. inferred

    Map.new((a => 1)).contains("a") is True with a warning

  12. 18

    A Hash coerced with .Set keeps the keys with truthy values, .Bag keeps only positive weights, and .Mix keeps negative weights too. inferred

    %(a => 0, b => 1).Set.raku is Set.new("b"); %(a => -1, b => 2).Bag.raku is ("b"=>2).Bag

  13. 21

    The pair sub builds a Pair keeping a non-Str key, ⇒ is the fat arrow, and .antipair keeps the value's type as the new key. inferred

    pair(1, 2).raku is 1 => 2; (a => 1).antipair.raku is 1 => "a"

More from this test: Containers & assignment (3), Operators (4), Stringification (5), Types & coercion (1).

hash-new-flatten-and-cool-encodeRaku++ passesRakudo passes2026-07-29 · 8b7a5485 · #12
  1. 1

    Hash.new flattens its arguments all the way down before pairing them, except that an itemized list does not flatten.

    Hash.new: @keys Z @values pairs each key with its value

More from this test: Strings & Unicode (2).

hash-push-append-and-itemised-valuesRaku++ passesRakudo passes2026-07-27 · 4c35f546
  1. 1

    %h.push and %h.append first flatten their arguments into pairs: a list, Seq or Hash argument contributes its own pairs.

    (my %inv).push: %wc.invert adds every inverted pair

  2. 2

    A named argument to %h.push contributes nothing, so %h.push(e => 6) and %h.push(:c(2)) are no-ops.

  3. 3

    On a new key both %h.push and %h.append store the value as it is, only a list value spreading; the two differ only for an existing key.

More from this test: Stringification (1).

hash-store-of-nil-is-oddRaku++ passesRakudo passes2026-11-12 · d1e39cb5 · #259
  1. 1

    Assigning Nil to a hash, %h = Nil or my %h = Nil, is the odd-number-of-elements error, because Nil takes one slot in a list.

    my %h = Nil throws, as %h = 1 and %h = (Nil,) do

  2. 2

    Assigning to a hash a variable that holds the undefined Any is the odd-number error, reported as "type object 'Any'".

  3. 3

    %(…) and %$x are the .hash coercion, under which an undefined value gives the empty Hash.

    %(Any) is an empty Hash

hash-values-map-rw-paramRaku++ passesRakudo passes2026-11-09 · 07e940ce
  1. 2

    Written through .values, a typed hash's value answers to the hash's type, and a QuantHash's weight set to 0 deletes the key.

More from this test: Containers & assignment (1).

is-deeply-strict-and-anton-batchRaku++ passesRakudo passes2026-08-28 · 2421c094
  1. 5

    A set operator's result takes the left operand's mutable flavour.

    SetHash (|) Set is a SetHash, Set (|) SetHash a Set, SetHash (+) SetHash a BagHash

More from this test: I/O & processes (3), Lists & laziness (1), Classes, roles & the MOP (3), Operators (3), Everything else (1), Regexes & grammars (2), Signatures & dispatch (1), Syntax & parsing (2).

issue-221-array-list-which-identityRaku++ passesRakudo passes2026-11-07 · 266d37c6 · #221
  1. 3

    (elem) walks the right-hand list's own elements without flattening it.

    @b (elem) (@b.item,) is True and 2 ∈ (1, (2, 3)) is False

More from this test: Lists & laziness (1), Classes, roles & the MOP (1).

issue35-zef-after-installRaku++ passesRakudo cannot run it2026-10-07 · 808e24eb · #35
  1. 1

    for %h -> $p hands out Pairs that hold the hash entry's own container, so %h{$p.key} = … in the body shows through $p.value.

More from this test: Containers & assignment (1), I/O & processes (1), Lists & laziness (1), Modules (1), Types & coercion (1).

itemized-list-hash-key-assignRaku++ passesRakudo passes2026-11-08 · 6e8cdfbe
  1. 1

    An itemized list in a hash subscript is one key when assigned to, as when read.

    %h{@b.item} = 1 stores one key

  2. 2

    An object hash assigned through an itemized array subscript keeps the array itself as the key.

itemized-range-hash-keyRaku++ passesRakudo passes2026-11-08 · 2cbd6521
  1. 1

    (1..2).item is itemized, as $(1..2) is, so it is one hash key in a subscript assignment.

    %h{(1..2).item} = 1 stores one key, "1 2"

keyof-capture-and-cool-subsRaku++ passesRakudo passes2026-07-27 · 4c35f546
  1. 1

    .keyof reports the declared key type of an object hash such as my %h{Int}, and a plain hash keys on the coercion type Str(Any).

More from this test: Signatures & dispatch (2), Stringification (1), Strings & Unicode (1).

listop-terms-and-empty-container-failuresRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 3

    An object hash declared with a key type and no value type is Hash[Any, K], so a missing key gives Any, not Mu.

More from this test: I/O & processes (1), Lists & laziness (4), Syntax & parsing (2).

lizmat-containers-and-dispatchRaku++ passesRakudo passes2026-09-13 · 3a8f2148
  1. 1

    .BIND-KEY($k, $value) binds the element, so it is not writable afterwards, exactly as %h<k> := v does.

More from this test: Classes, roles & the MOP (2), Signatures & dispatch (1), Strings & Unicode (1), Syntax & parsing (1).

missing-routines-batchRaku++ passesRakudo passes2026-07-26 · 8782278a
  1. 3

    The role coercers .Setty, .Baggy and .Mixy give the immutable member of each QuantHash family.

More from this test: Dates & times (1), Lists & laziness (3), Regexes & grammars (1), Stringification (1), Strings & Unicode (1).

modinfo-ecosystem-clusterRaku++ passesRakudo passes2026-08-02 · 2d99420e
  1. 6

    .Hash on a Hash or on a Map returns a Hash.

    %h.Map.Hash is {a => 1}

More from this test: I/O & processes (1), Lists & laziness (1), Operators (1), Regexes & grammars (3), Scoping & phasers (2), Signatures & dispatch (3), Syntax & parsing (7), Types & coercion (1).

object-hash-copy-keeps-keysRaku++ passesRakudo passes2026-10-31 · 9695e120 · #77
  1. 1

    An object hash assigned into another object hash keeps its keys as the objects they were.

    after my %copy{HashKey} = %original, a key of %copy is the object, not the Str "(HashKey)"

object-hash-keysRaku++ passesRakudo passes2026-07-28 · ccc187ec · #9
  1. 1

    An object hash my %h{Int} keeps keys of its declared key type: a stored key reads back as an Int, and .raku shows typed keys.

    after %h{+$k} = 66 the key is the Int 33, not the Str "33"

More from this test: divergences (1).

only-ellipsis-bracketed-infixRaku++ passesRakudo passes2026-08-20 · f4d8518b
  1. 3

    ∅ is a term for the empty Set.

  2. 7

    BagHash.remove takes one off each named key's count.

More from this test: Operators (2), Signatures & dispatch (1), Syntax & parsing (1).

pair-as-key-value-and-patternRaku++ passesRakudo passes2026-07-26 · 34ff4d2a
  1. 1

    A Pair is Associative on its one key: $p<a> is the value, $p<a>:exists is True, and any other key gives Nil.

More from this test: Operators (2), Stringification (2).

pair-subscript-nativeRaku++ passesRakudo passes2026-10-08 · e9e11f91
  1. 1

    $p<a> on a Pair whose key is a reads the Pair's value.

More from this test: Containers & assignment (1), Signatures & dispatch (1).

pointy-block-for-modifierRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 5

    Iterating a hash's .kv gives keys without a container and values with one, so -> $k, $v is rw writes through to the hash's values.

More from this test: Signatures & dispatch (3), Syntax & parsing (1).

quanthash-coerce-flattenRaku++ passesRakudo passes2026-07-22 · 7e58765b
  1. 1

    The quanthash coercers (.Bag, .Set, …) flatten one level through a List — (@a, %h).Bag takes @a's elements and %h's pairs — but an Array's itemized elements stay whole.

    [4,[5,6]].Bag keeps [5,6] as one key

quanthash-exact-sethash-zen-dynamicRaku++ passesRakudo passes2026-07-27 · 21328719
  1. 1

    Rat weights merged in a Mix are summed exactly.

    weights 1/10 and 1/50 for one key total 0.12, not 0.12000000000000001

  2. 2

    .set and .unset exist only on SetHash (Set.^can and BagHash.^can are both False), take one possibly-listy positional, and return Nil.

  3. 3

    An empty <> zen slice accepts subscript adverbs such as :k, :v and :kv.

    %h<>:k gives the hash's keys

More from this test: Scoping & phasers (1).

quanthash-not-mapRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    A Set, Bag, Mix, SetHash, BagHash or MixHash does Associative but is not a Map: it neither smartmatches Map nor binds to a Map $m parameter.

More from this test: Types & coercion (2).

quantifier-modifiers-and-anon-methodsRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 3

    Assigning a list to an angle-word slice of a SetHash is a list assignment in which each key follows the quanthash rule: False removes, True adds.

    $sh<a b> = False, True removes a and adds b

More from this test: Classes, roles & the MOP (1), Regexes & grammars (1).

rak-chain-install-gapsRaku++ passesRakudo passes2026-10-10 · e1663c0c
  1. 5

    $x := %h<k>:delete deletes the key and binds the deleted value.

More from this test: Concurrency (1), Classes, roles & the MOP (1), Signatures & dispatch (1), Types & coercion (2).

rakudo-t-language-gaps-2Raku++ passesRakudo passes2026-10-05 · e209ae16
  1. 3

    Hashes compare with cmp as their sorted pairs.

More from this test: Compile-time errors (1), Exceptions & control flow (2), Lists & laziness (2), Operators (2), Regexes & grammars (4), Scoping & phasers (1), Signatures & dispatch (1), Syntax & parsing (1).

rakuglaze-round-4Raku++ passesRakudo passes2026-10-03 · 99895bb5
  1. 7

    A value read from an object hash does not carry its key into another hash it is stored in.

  2. 8

    Hash.push stores a Slip value as it is, and slips it into an Array already under the key. inferred

More from this test: Exceptions & control flow (4), Lists & laziness (1), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (1), Signatures & dispatch (1), Types & coercion (2).

rakuglaze-round-6Raku++ passesRakudo passes2026-10-09 · 8902cac9
  1. 8

    Prefix | slips a hash held in a $ variable.

  2. 9

    .Hash on a hash held in a $ variable returns it without its item container.

More from this test: Concurrency (1), Exceptions & control flow (1), I/O & processes (1), Lists & laziness (2), Classes, roles & the MOP (1), Regexes & grammars (1), Scoping & phasers (1), Syntax & parsing (2).

range-is-the-set-of-its-elementsRaku++ passesRakudo passes2026-11-13 · cb91f67b · rakudo#2217
  1. 1

    Set membership coerces a Range to the Set of the values it iterates, so a value that merely lies between the endpoints is not a member.

    ½ ∈ ^2 is not True

  2. 2

    As a set operand an Int Range holds the Ints between its ends, and anything that is an Int (True, the allomorph <1>) is a member.

  3. 3

    An endless Range used as a set operand is refused as lazy.

repl-sandbox-and-capture-scopingRaku++ passesRakudo passes2026-09-02 · 5cdc21fe
  1. 6

    Hash(%a, %b, %c) merges all its arguments, and a Hash element in a list being made into a Hash contributes its pairs.

More from this test: Compile-time errors (1), Regexes & grammars (4).

roast-3log-batch1Raku++ passesRakudo passes2026-09-28 · ea9f1388
  1. 7

    Pair.freeze keeps the Pair's identity.

More from this test: Dates & times (1), Exceptions & control flow (2), I/O & processes (3), Lists & laziness (2).

roast-sweep-runtimeRaku++ passesRakudo cannot run it2026-09-28 · 2cc896bd
  1. 10

    A Hash store puts each value in a Scalar container, and a Map's values have none. inferred

  2. 12

    deepmap over a Hash drops a key whose block returns Empty. inferred

  3. 16

    .values hands out a hash's own containers, so a map that assigns to $_ writes through, and a QuantHash drops a key whose weight becomes 0 that way. inferred

  4. 30

    A Junction that a classify classifier returns is one key of the result, looked up as itself. inferred

More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (2), Exceptions & control flow (2), I/O & processes (3), Lists & laziness (5), Modules (2), Classes, roles & the MOP (8), Operators (4), Everything else (1), Regexes & grammars (1), Scoping & phasers (14), Stringification (1), Strings & Unicode (1), Types & coercion (3).

set-iterates-pairsRaku++ passesRakudo passes2026-11-09 · 8f55e40a
  1. 1

    A Set iterates as Pairs elem => True: for, .list, .map, .grep, .sort, .first and .join all see the pairs.

    for set(3) sees 3 => True

More from this test: Lists & laziness (1).

set-op-assign-starts-emptyRaku++ passesRakudo passes2026-11-12 · 00c30ed1
  1. 1

    A set or bag operator op-assigned to an undefined target starts from its identity: set() for ∪ ∩ ∖ ⊖ and their ASCII forms, bag() for ⊎ and ⊍.

    my $s; $s ∪= 0 holds only 0, not Set.new(Any, 0)

  2. 2

    A set or bag operator reduced over nothing answers its identity, set() or bag().

    [∪] () is set() and [⊎] () is bag()

set-ops-reduce-max-adverbsRaku++ passesRakudo passes2026-08-20 · d75f13a6
  1. 1

    A plain list is treated as a Set in a set operation, so a repeated element counts once.

    (1,2,2,3) (-) (2,) is Set(1 3); (1,1,2) (==) (1,2) is True

  2. 4

    :k/:v/:kv/:p on .max/.min of an Associative answer in terms of the mapping, where on a Positional :k is the index.

    %h.max(:v) is the largest value and %h.max(:k) its key

More from this test: Lists & laziness (1), Operators (2).

slices-trans-and-exact-sequencesRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 1

    A subscript that is a call is a slice when the call returns a list, and a single-key subscript when it returns one value.

    %orig{ %new.keys } = %new.values assigns key by key

  2. 3

    A Pair is one element whose .keys is its key, not the index 0.

  3. 4

    A Pair whose value is a Hash inverts to one pair per entry of that hash.

More from this test: Lists & laziness (1), Regexes & grammars (1), Strings & Unicode (2), Syntax & parsing (1).

splice-rotor-rettype-and-placeholdersRaku++ passesRakudo passes2026-07-27 · d399d9a1
  1. 5

    .Hash and .Map on a Pair give the one-entry hash it describes.

More from this test: Lists & laziness (1), Signatures & dispatch (1), Strings & Unicode (1).

str-range-consumersRaku++ passesRakudo passes2026-07-22 · 437647ae
  1. 3

    A Range used as the key of a Pair is kept as a Range, not stringified.

    ('A'..'C' => 1).key is the Range, not the Str "A B C"

More from this test: Stringification (1), Strings & Unicode (1).

top100-chunk-c-b1-2026-09-03Raku++ passesRakudo does not pass2026-09-03 · 8ed8618a
  1. 1

    A Junction used as a Pair key in a hash initialiser autothreads: the value is stored under each eigenstate.

    my %h = ("a"|"b") => 1, "c" => 2 has 3 keys with %h<a> == 1 and %h<b> == 1

More from this test: Modules (1), Classes, roles & the MOP (1).

tries-with-frequenciesRaku++ passesRakudo passes2026-08-31 · 68e53568 · #53
  1. 4

    %h.push: ($k, $v) pairs consecutive non-Pair items up as key and value.

More from this test: Lists & laziness (2), Classes, roles & the MOP (1), Operators (2), Signatures & dispatch (1).

typed-hash-pair-value-checks-typeRaku++ passesRakudo passes2026-11-13 · a64cd841 · rakudo#2068
  1. 1

    Assigning to .value of a Pair taken from a typed hash (via .map, .pairs, for %h or %h.pairs[0]) is checked against the hash's element type and throws X::TypeCheck::Assignment on a mismatch, as %h<k> = … does.

    my Int %h = :42foo; %h.map: { .value = 'meows' } throws X::TypeCheck::Assignment

value-identityRaku++ passesRakudo passes2026-07-28 · 7768b86c
  1. 1

    Two distinct instances of a class are distinct elements of a Set or Bag.

    set($x, $y).elems is 2 for two instances of one class

More from this test: Numerics (1), Operators (1), Types & coercion (3).

whatever-value-pair-keyRaku++ passesRakudo passes2026-11-08 · ae41bc63
  1. 1

    A Whatever held in a variable keeps its type as a Pair's key.

    my $w = *; ($w => 1).raku is * => 1, and .key === $w holds

which-identity-and-set-op-elementsRaku++ passesRakudo passes2026-07-27 · d8735776
  1. 2

    The result of a set operator keeps its elements with their original types, not their string keys.

    set(1,2) ∪ set(2,3) holds the Ints 1, 2, 3, not Set.new("1","2","3")

More from this test: Types & coercion (1).

zef-load-fixesRaku++ passesRakudo passes2026-07-24 · 75f92c65
  1. 1

    @%h and @$hash give the hash's Pairs as a list, not the hash as a single element.

    for @$node -> $sub-node iterates the pairs

More from this test: Classes, roles & the MOP (1), Syntax & parsing (1).