Raku Cases › Lists & laziness

Lists & laziness

Lists, Arrays, Seqs, ranges, flattening, and when a block actually runs.

265 rules from 155 tests. 144 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.

array-composer-sourcesRaku++ matches Rakudo on all 38 probes2026-11-28 · 2889ad4a
  1. 2

    A single argument of [ ] that comes out of a $ variable, an array element or a hash value is the one item it is.

  2. 3

    The way the single argument of [ ] is written does not change the one-argument rule: [do X], [(X)], [c ?? X !! 0], [X || 0] and [try X] give what [X] gives.

modifier-loop-as-expressionRaku++ matches Rakudo on all 18 probes2026-11-29 · f9f31192
  1. 1

    EXPR for LIST where a value is wanted (after do, gather, try, in parentheses, on the right of =) is the loop, run where it stands, and its values are a List, not a lazily read Seq.

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

    The .snip method and the snip sub exist only from 6.e.

    (1,2,3,4,5).snip(* < 3) is ((1 2) (3 4 5)) under 6.e and "No such method" under 6.d

  2. 3

    The rotor sub exists only from 6.e.

    rotor(2, 1..6) is ((1 2) (3 4) (5 6)) under 6.e and "Undefined routine" under 6.d

  3. 8

    An array multislice selecting one element returns the value under both 6.d and 6.e.

    my @a = [[1,2],[3,4]],; @a[0;1;0] is 3

  4. 11

    From 6.e a Range is true only when it holds something; before 6.e a Range is always true.

    (5..1).Bool is False under 6.e and True under 6.d

  5. 13

    From 6.e Int.pick(n) is short for (^Int).pick(n); before 6.e it picks from a one-item list.

    6.pick(3).elems is 3 under 6.e and 1 under 6.d

  6. 19

    From 6.e an itemized replacement given to .splice goes in whole; before 6.e every replacement flattens.

    my @a = 1,2,3; @a.splice(1,1,$[8,9]) leaves [1, [8, 9], 3] under 6.e and [1, 8, 9, 3] under 6.d

  7. 27

    From 6.e .skip takes several counts, alternately producing and skipping; before 6.e it takes one count only.

    under 6.e (1..10).skip(2,3).List is (1 2 6 7 8 9 10)

  8. 28

    From 6.e a ||@i slipped subscript navigates the array's dimensions; before 6.e it is a plain slice.

    my @a = [[1,2],[3,4]],; my @i = 0,1,0; @a[||@i] is 3 under 6.e

More from this test: Dates & times (2), Exceptions & control flow (1), Hashes & sets (3), I/O & processes (2), 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).

any-flatmap-and-match-flatRaku++ passesRakudo passes2026-09-16 · b22d82fc
  1. 1

    flatmap is a method on Any, where a lone scalar is a one-element list.

    42.flatmap({…}) is (42,).Seq

More from this test: Regexes & grammars (1).

array-array-copiesRaku++ passesRakudo passes2026-10-10 · 314a4f32
  1. 1

    @a.Array is a new Array, never the invocant: a .push, .unshift or element assignment through the result leaves the source unchanged.

    @a.Array === @a is False

  2. 2

    A List's .Array does not share storage with the List: pushing onto (1, 2).Array leaves the List as it was.

array-composer-contextualized-arrayRaku++ passesRakudo passes2026-10-04 · fb6b80d4
  1. 1

    By the one-argument rule, a single contextualized array in an array composer, [ @$v ], [ @($v) ] or [ $v<> ], spreads into its elements, and [ $h<> ] spreads a hash's pairs.

array-composer-contextualized-hashRaku++ passesRakudo passes2026-10-03 · 88890183
  1. 1

    By the one-argument rule, a single Hash contextualizer in an array composer, [ %( … ) ] or [ %$h ], spreads into its pairs.

    [ %( a => 1, b => 2 ) ] has two elements

array-composer-one-arg-rangeRaku++ passesRakudo passes2026-10-04 · 0b4b91e2
  1. 1

    In an array composer a $ variable holding a Range is one element; the one-argument rule does not spread an itemized value.

    my $r = 1..3; [$r] has one element

array-composer-spreads-returned-hashRaku++ passesRakudo passes2026-11-25 · 78bb0a72 · #283
  1. 1

    The one-argument rule of [ ]: a single argument that is Iterable and sits in no Scalar container gives its elements, whatever expression produced it.

    [ h() ], [ %h.clone ] and [ Hash.new(…) ] hold the Hash's pairs, not one Hash

    Also held by array-composer-sources, array-literal-spread.

  2. 2

    In [ ] a $ item, an argument with a trailing comma, an element fetched from an array and a Set stay whole as one element.

array-elements-are-items-to-list-methodsRaku++ passesRakudo passes2026-10-16 · 43e63076
  1. 1

    A list method over an Array hands out its elements as items: the topic a .map block gets and what .grep, .first, .sort or .head hand back are itemized.

    my @rows = [1, 2], [3, 4]; @rows.map({ my @y = $_; @y.elems }) is (1 1)

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

array-from-endless-range-is-lazyRaku++ passesRakudo passes2026-10-04 · 04d79271
  1. 1

    An Array built from an endless integer Range, by [1..*] or (1..*).Array, is a lazy Array of the Range's elements.

    [1..*].is-lazy is True and [1..*][^5] is its first five elements

array-list-decontainerizesRaku++ passesRakudo passes2026-10-09 · 8f579d98
  1. 1

    @a.List decontainerizes: an element stored itemized by @a[0] = [5, 6] comes back in the List without its $.

    after @a[0] = [5, 6], @a.List is ([5, 6], [3, 4])

    Also held by array-elements-are-items-to-list-methods.

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

    .EXISTS-POS(-1) is False.

    .EXISTS-POS(-1) is False

  2. 6

    deepmap and duckmap iterate a Range's elements, and itemize a nested one.

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

audited-language-gaps-2Raku++ passesRakudo passes2026-10-04 · 39c1aeb6
  1. 2

    An Array is its own .cache.

  2. 6

    .join on an endless Range answers ..., and the join routine stops at a lazy argument.

    (1..*).join is ...

  3. 7

    An array composer with an endless Seq slipped into it is a lazy Array.

    [0, |(1...*)] is a lazy Array

More from this test: Compile-time errors (2), Containers & assignment (1), Dates & times (1), Operators (1), Regexes & grammars (2), Strings & Unicode (2), Types & coercion (1).

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

    .nodemap keeps a Slip its block returns as one element.

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

base64-sextetRaku++ passesRakudo passes2026-07-23 · 820a2168
  1. 3

    A Blob/Buf answers list methods such as .rotor over its bytes.

More from this test: Exceptions & control flow (1), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (4).

batch1-silent-wrong-answersRaku++ passesRakudo passes2026-08-27 · 0d989883
  1. 3

    A sequence whose seeds are neither arithmetic nor geometric throws X::Sequence::Deduction, with from naming the seeds.

    1, 4, 9 ... 100 throws

  2. 6

    Reading an array with a negative subscript computed at run time throws X::OutOfRange.

More from this test: I/O & processes (3), Numerics (1), Everything else (2), Scoping & phasers (1).

batch2-twin-consolidationRaku++ passesRakudo cannot run it2026-08-27 · 9d7809f7
  1. 2

    X and Z take their operands' elements one level deep, without flattening sublists.

    (1,0) X (<a b>, <c d>) has 4 pairs

More from this test: Operators (1), divergences (1).

binding-is-a-list-operationRaku++ passesRakudo passes2026-08-20 · 3d937688
  1. 2

    A zip of two endless sides stays lazy.

    2..* Z* 2..* is the perfect squares

More from this test: Operators (1).

blob-new-of-lazy-seqRaku++ passesRakudo passes2026-11-11 · c68ec738 · #241
  1. 1

    Blob.new and Buf.new given a Seq that nothing has read yet, such as a .map result or a gather, take its elements.

    Blob.new(f()), where f returns a .map Seq, is Blob:0x<01 02 03>

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

    Zipping against a lazy infinite list such as $i xx * draws as many elements from it as the other side has. inferred

More from this test: Hashes & sets (1), Operators (1), Types & coercion (2).

bound-attribute-truthinessRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 2

    Rakudo::Iterator.OneValue($x) and Rakudo::Iterator.Empty exist and give a one-value and an empty iterator.

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

code-objects-have-a-list-viewRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    A Code object (a sub, a block, a Regex) answers Any's one-element list methods such as .cache.

    rx/a/.cache is (rx/a/,)

combinations-rat-range-sizesRaku++ passesRakudo passes2026-11-13 · 3db5cae5 · rakudo#1629
  1. 1

    .combinations over a non-Int Range of sizes runs from (min + excludes-min).Int to (max - excludes-max).Int, or takes every size when the max is past the list's element count.

    <a b c>.combinations(2.3..^3.6) includes (a b c)

conformance-list-adverbsRaku++ passesRakudo passes2026-07-26 · a1d04a23
  1. 1

    .rotor with several sizes cycles through them (.rotor(2, 3) takes 2, 3, 2, 3, …), and a complete trailing window is emitted.

  2. 2

    .min and .max take :by(&code) as the named spelling of the mapper, and :k/:v/:kv/:p, which report every position attaining the extremum.

  3. 3

    The min and max subs treat a lone Positional or Associative argument as the list, and do not flatten several arguments.

  4. 4

    .first takes :v, :kv and :p as well as :k, and accepts a Regex matcher.

  5. 5

    .sort, .reverse, .unique, .squish, .head, .tail, .skip and .rotor, and their sub forms, return a Seq.

  6. 6

    deepmap and duckmap answer in the invocant's container type and nodemap always a List; as subs all three are list operators taking a bare first argument.

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

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

    .kv, .keys, .values, .pairs, .antipairs and .invert return a Seq on every container.

  2. 7

    .pop or .shift on an empty Array returns a Failure — falsy, so while @a.shift terminates — that throws X::Cannot::Empty when the value is used.

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

conformance-phase3-containersRaku++ passesRakudo passes2026-07-25 · 4ab9323f
  1. 2

    .splice returns an Array.

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

core-type-roles-and-iterator-defaultsRaku++ passesRakudo passes2026-10-04 · 289f1691
  1. 4

    A class that does Iterator and defines pull-one gets push-exactly, push-all, sink-all, skip-one and the other default methods built on it, and .can sees them.

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

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

    |%hash inside a list slips the hash's pairs into the list.

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

cro-install-engine-fixesRaku++ passesRakudo passes2026-10-10 · 29f5aa55
  1. 6

    List.new and Array.new flatten a Slip argument.

More from this test: Concurrency (4), I/O & processes (1), Classes, roles & the MOP (1), Regexes & grammars (1), Signatures & dispatch (7), Strings & Unicode (1), Syntax & parsing (2).

custom-iterator-protocolRaku++ passesRakudo passes2026-07-26 · ba5c5af5
  1. 1

    A for loop over an object with its own .iterator method walks the iterator that method returns, whether a user object driven by pull-one or a built-in iterator.

  2. 2

    An object with its own .iterator is iterated by for even when held in a $ variable.

  3. 4

    A literal IterationEnd in a list ends a for loop there, in block and statement-modifier form, while .map sees it as an ordinary element that stringifies to its own name.

  4. 5

    An iterator's .skip-one and .skip-at-least return an Int, not a Bool.

  5. 6

    .lazy marks a list as lazy, and an iterator over an unordered source reports itself as not deterministic. inferred

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

data-generators-clusterRaku++ passesRakudo passes2026-08-21 · 31b0a7ad
  1. 1

    A Rat index into a lazy sequence reifies it up to that position, as an Int index does.

    $seq[($n + 2) / 2] indexes a lazy gather

  2. 2

    A Range among several items of an array composer stays a Range; only a sole Range argument spreads.

    [<1 8 A>, <Y H>, "0".."9"] has a Range as its third element

  3. 5

    pick and roll given the Whatever type object behave as with the * literal.

    for a ten-element @l, @l.pick(Whatever).elems is 10

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

dbdish-native-and-list-defectsRaku++ passesRakudo passes2026-08-25 · 5faed01f · #28
  1. 6

    The one-argument rule applies inside a [ … ] composer.

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

digest-native-widths-clusterRaku++ passesRakudo passes2026-08-03 · cc0f34e5
  1. 10

    |$x slips one level only, even when the list is held in a scalar, so sublists keep their structure.

    with $s = ((1, 2), (3, 4)), ("A", |$s) has elements of type Str, List, List

  2. 11

    reduce and produce follow the one-argument rule: several arguments stay as they are, and a single Range or Array spreads.

    reduce { $^a ~ '|' ~ $^b.^name }, 'I', (1, 2), (3, 4) is I|List|List; reduce { $^a + $^b }, 1 .. 4 is 10

More from this test: Containers & assignment (2), Numerics (4), Operators (2), Scoping & phasers (1).

divergence-result-typesRaku++ passesRakudo passes2026-07-25 · e05a8563
  1. 3

    X, Z, their operator forms such as X+ and Z+, .grep and xx return a Seq. inferred

    (1 X 2).^name is Seq

  2. 5

    Prefix | on a single value gives a one-element Slip. inferred

    |(1) is a Slip

  3. 8

    A sequence generator with a slurpy @_ receives every element produced so far. inferred

    (1, 2, sub { [*] @_[*-1], @_ + 1 } ... 720) is 1 2 6 24 120 720

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

duration-slip-fail-destructureRaku++ passesRakudo cannot run it2026-10-22 · 3e97932e
  1. 3

    .push and .unshift slip a Slip held in a Scalar variable.

    @a.push($s) with a Slip in $s adds its elements, not the Slip

  2. 4

    The unshift sub is the method on its first argument: it answers the array rather than the new length, slips a Slip and type-checks the values.

More from this test: Containers & assignment (1), Dates & times (2), Exceptions & control flow (1).

eager-from-loop-runs-to-lastRaku++ passesRakudo passes2026-11-13 · c47aa1ea · rakudo#1692
  1. 1

    eager runs an unconditioned Seq.from-loop until its body says last.

    eager Seq.from-loop: { $i++; last if $i > 5; $i } does not die with "Cannot eager a lazy list"

  2. 2

    A Seq.from-loop body whose value is Empty (such as a false last if …) adds no element.

    eager Seq.from-loop: {$i++; last if $i > 5}, {1} is ()

ecosweep-900-batchRaku++ passesRakudo passes2026-09-09 · 063a5a1a
  1. 2

    [ f() ] spreads the Array a call returns, and spreads an Iterable object through its iterator.

  2. 10

    take of a Slip splices its elements into the gathered sequence.

  3. 11

    An endless Range inside an index list clamps to the array's end.

  4. 14

    .append flattens a sole Range argument into its elements.

More from this test: Containers & assignment (1), I/O & processes (1), Numerics (1), Operators (2), Regexes & grammars (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1).

endless-range-reduceRaku++ passesRakudo passes2026-08-14 · b4b8702e · #19
  1. 1

    [+] over an endless Range answers the limit of the series, as .sum does.

    [+] 1..Inf is Inf

  2. 2

    [min] and [max] over an endless Range answer from the range's own bounds.

  3. 3

    Any other reduction over an endless Range, and any reduction over an endless lazy list, refuses rather than folding a finite prefix.

More from this test: Stringification (1).

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

    An object that is neither Iterable nor Associative (a DateTime, Date, Channel, Lock) lists as itself, one element, under list assignment, .list, .flat, .elems and the | slip.

    my @a = DateTime.new(0) holds one element, and DateTime.new(0).elems is 1

More from this test: Hashes & sets (1).

exe-nested-class-nativeRaku++ passesRakudo passes2026-11-19 · edc7c865
  1. 4

    @a[lazy ^N] ends with the array instead of being padded to N elements. inferred

    Also held by exe-nested.

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

exe-sub-reads-at-underscoreRaku++ passesRakudo passes2026-11-06 · fe5426ca
  1. 3

    A lazy argument makes the implicit @_ lazy, as it does any *@a.

    f(1..*) leaves @_ lazy

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

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

    [ %$h ] and [ %(…) ] spread the hash's pairs into the array under the one-argument rule.

More from this test: Containers & assignment (1), Hashes & sets (2), Regexes & grammars (1), Signatures & dispatch (1), Types & coercion (1).

fallback-nil-and-slicesRaku++ passesRakudo passes2026-07-31 · e1679c33
  1. 3

    A literal range subscript honours an exclusive start: @a[1^..3] skips index 1.

    @a[1^..3] selects indices 2 and 3

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

finite-lazy-arrayRaku++ passesRakudo passes2026-10-04 · ddf56aba
  1. 1

    A finite list made lazy with lazy is lazy until it has been read to its end: it refuses what needs its length and renders as [...] / (...).

    lazy 1..3 refuses .elems and says .is-lazy is True

  2. 2

    A lazy list keeps its laziness through [ ], .Array, .Seq and assignment, and stops being lazy once a for or .eager has read it out.

flat-keeps-itemized-hashRaku++ passesRakudo passes2026-11-09 · 689728bf
  1. 1

    .flat keeps an itemized Hash whole, as it keeps an itemized List or Array.

    my $h = %(b => 2); ($h, 1).flat is (${:b(2)}, 1)

flat-squish-and-exit-from-a-workerRaku++ passesRakudo passes2026-07-26 · efafccfc
  1. 1

    The flat sub opens each argument one level — an Array argument gives its elements — and then descends only through non-itemized sublists, leaving itemized ones whole.

  2. 2

    The .flat method never opens an Array below the top level.

  3. 3

    .squish compares with === by default, and :with supplies a different comparison.

    42 and "42" are not adjacent duplicates

More from this test: Concurrency (1), Dates & times (1).

flatmap-is-map-then-flatRaku++ passesRakudo passes2026-11-09 · 5a0e9868
  1. 2

    .flatmap flattens a nested list in a block's result all the way down, not one level.

    (1, 2).flatmap({ ($_, ($_, ($_,))) }) is fully flat, not (1, (1, (1,)), 2, (2, (2,)))

  2. 3

    .flatmap keeps whole what .flat keeps whole: an itemized list, an Array's element, and an Array inside an Array.

    a block result $($_, $_) stays one element

flatmap-of-gatherRaku++ passesRakudo passes2026-11-09 · 0d87a53e · #235
  1. 1

    A .flatmap block that returns a gather sequence contributes that sequence's elements to the result.

    (1, 2).flatmap({ gather { take $_ } }) spreads the taken elements; it is not ()

flatmap-spreads-lazilyRaku++ passesRakudo passes2026-11-09 · 2867e40e
  1. 1

    .flatmap is .map followed by .flat.

    Also held by flatmap-is-map-then-flat.

  2. 2

    .flatmap is as lazy as the .map it is built on.

  3. 3

    .flat spreads a non-itemized Hash held in a list into its pairs.

    Also held by flat-keeps-itemized-hash, flatmap-is-map-then-flat.

for-bigint-rangeRaku++ passesRakudo cannot run it2026-10-24 · e614993a
  1. 1

    A for over a Range whose ends are past int64 walks its real integers.

    for 2**64 .. 2**64 + 2 -> $i runs three times, starting from 2**64

  2. 2

    An endless Range with a big Int start (2**64 .. *) keeps its start, in .raku and when iterated lazily until a last.

    (2**64 .. *).raku does not say 9223372036854775807..Inf

for-expression-is-a-listRaku++ passesRakudo passes2026-08-10 · 862f352f
  1. 1

    A for used as an expression returns a List, in both the statement-modifier and the block spelling.

    my \a = ($_ for ^2) and my $b = (for ^5 { $_ }) are both Lists

for-over-listing-valueRaku++ passesRakudo passes2026-10-28 · c50eb3b8 · #146
  1. 1

    A for over a value in no container iterates what its .list gives: a Channel's or a Supply's values, a Match's positional captures, a class's own list.

    sub drain(Channel $in) { for $in -> $v { … } } receives the Channel's values

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

for-over-range-map-streamsRaku++ passesRakudo passes2026-11-15 · 41e0b608 · #263
  1. 1

    A map or grep block runs when its result is read, one element at a time, whatever the source is and whoever reads it.

    for (^3).map({…}) {…} runs in the order m0 b0 m1 b1 m2 b2

    Also held by for-map-streams, map-runs-as-it-is-read.

from-iterator-keeps-its-typeRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    Slip.from-iterator($it) answers a Slip.

More from this test: Stringification (1).

gather-coroutine-lazinessRaku++ passesRakudo passes2026-09-27 · 0d048722
  1. 1

    A gather block runs only when something pulls a value, and only as far as that pull needs.

  2. 2

    A gather block's dynamic scope and its exceptions belong to the consumer that pulls from it.

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

gather-in-numeric-contextRaku++ passesRakudo passes2026-09-28 · 2cc896bd
  1. 1

    A gather Seq that nothing has pulled from yet, used as a number in an arithmetic operator, counts the values it will take, as +$seq and .elems do.

gather-late-blockRaku++ passesRakudo passes2026-09-27 · 0d048722
  1. 2

    An object whose .iterator hands out a gather's iterator iterates its values under for and .sort.

    method iterator { self.dir.iterator }

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

gather-loop-lazy-forRaku++ passesRakudo passes2026-08-28 · 7de6c683
  1. 1

    for over an unfinished gather iterates it live, one element at a time, so a consumer that stops early runs the generator no further.

    a consumer taking one element of gather loop { take … } runs one take

gather-probe-budgetRaku++ passesRakudo passes2026-08-21 · f4190954
  1. 2

    A gather of more than 64 takes renders and compares by all of its elements.

    a 100-take gather prints 100 elements and is is-deeply its own contents

gather-probe-stops-loopingRaku++ passesRakudo passes2026-08-30 · 02458b17
  1. 1

    A gather assigned to a scalar is lazy: the declaration returns even when its loop never ends and stops taking, and the elements already taken can be read.

    my $evens = gather for 1 .. * { take $_ if 45 < $_ < 55 }; say $evens[^5] returns and prints instead of hanging

getopt-long-parameter-traitsRaku++ passesRakudo passes2026-08-30 · 5e23726e
  1. 9

    Indexing a non-Positional value with [0] returns the value itself.

    (/ ^ (\w+) /[0]).WHAT is Regex; 42[0] is 42

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

grand-review-b-parserRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 11

    The value of a colonpair with a multi-word angle value is a List, not an Array.

    (:a<b c>).value is a List

More from this test: Compile-time errors (3), Regexes & grammars (2), Signatures & dispatch (1), Strings & Unicode (1), Syntax & parsing (5).

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

    .unique and .repeated compare elements with ===, so values of different types are distinct.

    (1, "1", 1e0).unique.elems is 3

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

grand-review-c3b-subscriptsRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 1

    A negative number held in a variable is out of range as an array subscript: reading @a[$i] gives a Failure (X::OutOfRange) and writing throws.

More from this test: Compile-time errors (1).

grand-review-c4b-modules-seqRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 1

    The sequence operator ... with Int seeds at or beyond 2**53 steps exactly in integers.

    (2**53, 2**53 + 1 ... 2**53 + 3).elems is 4

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

head-tail-callable-count-from-endRaku++ passesRakudo passes2026-11-13 · ad10ad81 · rakudo#2485
  1. 1

    A Callable count given to .head, .tail or .skip is an offset from the end: it is called with 0 and its result is added to the element count.

    <a b c>.head(*.elems - 1) takes all three elements

hyperwhatever-slice-any-baseRaku++ passesRakudo passes2026-10-02 · 99f09017 · #114
  1. 1

    [**] flattens every leaf, however deep, on any base: an EVAL result, a call, a parenthesised list, a Range or a Seq, not only an @ variable.

interp-meta-mixin-block-sig-allomorphRaku++ passesRakudo passes2026-07-27 · e143336a
  1. 6

    .tree(N) itemizes every node below the root, so a later .flat does not descend into them.

More from this test: Classes, roles & the MOP (1), Regexes & grammars (1), Signatures & dispatch (1), Strings & Unicode (1), Types & coercion (1), divergences (1).

iospec-parts-and-numeric-identityRaku++ passesRakudo passes2026-07-27 · 5ee18c68
  1. 8

    A one-parameter .sort block is a key extractor, called once per element.

More from this test: I/O & processes (4), Numerics (1), Strings & Unicode (1), Types & coercion (1).

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

    An object answers Any's one-element-list interface: .elems is 1, .end is 0, .keys is (0,), and it is its own .head.

    for my $w = Widget.new(x => 1), $w.head === $w

More from this test: Hashes & sets (1), I/O & processes (3), 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. 1

    .WHICH of an Array, a List or a Seq is identity, as === is: stable for the life of the object however it changes, and distinct for two objects holding the same elements.

    Set.new(@b.item, @c.item) has two elements though both arrays hold 1, 2

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

issue-68-multidim-endless-rangeRaku++ passesRakudo times out2026-09-06 · abd3d115 · #68
  1. 1

    Under use v6.e.PREVIEW, an endless Range dimension in a multidimensional subscript stops at the last index of the level it selects from, in plain reads, adverbed forms and slice assignment.

    for four rows ["a", 1, 2]…["d", 1, 2], @a[0..*; 0] is (a b c d)

  2. 2

    A finite Range subscript that overruns the array pads with (Any) for the missing elements.

    @a[0..10] on a shorter array has trailing (Any)s

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

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

    A lazy .map (such as one over a gather) flattens the Slips its block returns.

    .map(*.Slip) over a gather flattens

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

issue54-interpolated-assertion-capturesRaku++ passesRakudo passes2026-09-02 · 64311917 · #54
  1. 4

    A Slip produced inside a hyper method call splices its elements into the result.

    …>>.<mymatch>>>.Slip>>.Str yields the captured strings flat

More from this test: Regexes & grammars (3).

itemization-and-list-foldsRaku++ passesRakudo passes2026-07-26 · 0ccec43d
  1. 3

    list(…) builds a List of its arguments without flattening them; only a lone non-itemized Positional spreads.

  2. 8

    .head, .tail and .skip accept any Callable as their count, not only a WhateverCode.

  3. 9

    The reduce and produce subs follow the associativity of an &[OP] operator as the methods do, and reducing an empty list with an operator gives that operator's identity.

More from this test: Containers & assignment (1), Numerics (1), Operators (2), Regexes & grammars (1), Stringification (1).

itemized-argument-is-one-itemRaku++ passesRakudo passes2026-10-08 · 425d70df
  1. 1

    max, min, unique, squish, zip and cross take a List or Array held in a $ variable as one item.

    for my $l = (5, 7): max($l) is the List, unique($l) is ((5 7)), zip($l, $m) is (((5 7) (1 2)))

  2. 3

    flat($l) of a single List held in a $ variable spreads it under the single-argument rule, while flat($l, 1) keeps it whole.

  3. 4

    max(@b), max((5, 7)), max(|$l), sum($l), minmax($l) and a Range held in a variable spread their argument.

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

itemized-range-stays-oneRaku++ passesRakudo passes2026-11-08 · 21111219
  1. 1

    An itemized Range is one element in a list: the one-argument rule of an array literal, .flat and an @ assignment leave it whole.

    my @a = (1..2).item has one element, ((1..2).item, 3).flat two and [$(1..2)] one

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

iterable-object-and-named-subsigRaku++ passesRakudo passes2026-08-05 · 921e38c7
  1. 1

    An object that does Iterable answers the list methods the Iterable role supplies by running its own .iterator.

  2. 4

    .list, .elems, .reverse, .join and .kv on a user object that does Iterable treat the invocant as one item.

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

iteration-buffer-createRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    IterationBuffer.CREATE is an empty IterationBuffer that accepts .push.

js-backend-fixes-2026-10-11Raku++ passesRakudo passes2026-10-11 · 33d25fb9
  1. 5

    .map(|*) is a WhateverCode that slips, flattening one level. inferred

    ((1, 2), (3, 4)).map(|*).List is (1, 2, 3, 4)

  2. 6

    .max(:by(…)) and .min(:by(…)) on a Range compare its members by the key, while a bare .max on a Range is its endpoint. inferred

    for my @vals = 3, 9, 4, (^@vals).max(:by({ @vals[$_] })) is 1; (^3).max is 3

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

langrev-travels-with-codeRaku++ passesRakudo cannot run it2026-08-19 · ea807cac
  1. 3

    Under 6.d a Str range is a per-position cross product of its endpoints' characters.

    ("az".."bc") has 52 elements under 6.d

More from this test: Modules (1), divergences (1).

lazy-list-through-slurpyRaku++ passesRakudo passes2026-09-16 · 707b27f3
  1. 1

    A lazy list passed as the sole argument to a *@a or +@a slurpy stays lazy, so @a.is-lazy is True inside the routine; with several arguments the slurpy collects them.

    16.polydiv: 16 xx * takes the routine's lazy branch

lazy-seq-past-a-millionRaku++ passesRakudo passes2026-11-15 · dbe463ff · #262 · #263
  1. 1

    A lazy Seq is read past its millionth element: element N is read however far it is, and a source that ends is read to its end.

    (gather { take $_ for ^1_500_000 }).elems is not cut off at 1000000

    Also held by seq-drain.

lazy-views-are-seqsRaku++ passesRakudo passes2026-10-09 · 6acb4326
  1. 1

    .map, .grep and .skip over a lazy source return Seqs, as they do over a finite list.

    (0..*).map(* * 2).^name is Seq

list-array-semantics-sheetRaku++ passesRakudo passes2026-09-19 · 1e36359f
  1. 1

    The list builders zip, roundrobin, a chained X, [Z], flat, rotate and xx Inf answer a Seq. inferred

    zip((1, 2), (3, 4)).raku is ((1, 3), (2, 4)).Seq

  2. 2

    reverse() with no arguments throws X::NoZeroArgMeaning, and reverse with several arguments keeps each argument as one element. inferred

    reverse((1, 2), 3).raku is (3, $(1, 2)).Seq

  3. 3

    .flat leaves an Array's itemized elements whole but spreads a List's elements, and .flat(:hammer) flattens regardless. inferred

    [1, [2, 3]].flat.raku is (1, $[2, 3]).Seq; (1, [2, 3]).flat.raku is (1, 2, 3).Seq

  4. 9

    splice validates its offset and size with X::OutOfRange, refuses a lazy replacement with X::Cannot::Lazy, and the array it returns keeps the element type. inferred

    my @a = 1..3; @a.splice(9) throws X::OutOfRange with what Offset argument to splice and range 0..3

  5. 10

    .grab removes the elements it returns; on an empty array it answers Nil, and its counted form answers an empty Seq. inferred

    [].grab.raku is Nil; [].grab(2).raku is ().Seq

  6. 11

    On a lazy list .elems, .reverse, .sum, .pick and .Capture answer a Failure, while .sort and .tail throw X::Cannot::Lazy. inferred

    (1..*).list.elems.^name is Failure

  7. 13

    append of a lazy source and push onto a lazy array throw X::Cannot::Lazy, while pop on a lazy array answers a Failure. inferred

  8. 14

    Array.new follows the single-argument rule: one Iterable is the list, several arguments are elements, and an itemized Iterable is one element; an endless source stays lazy. inferred

    Array.new((1, 2)).raku is [1, 2]; Array.new($(1, 2)).raku is [(1, 2),]

  9. 17

    Empty is a singleton: slip() is that same object, a list method on it short-circuits to Empty, and Empty.List is the empty list. inferred

    slip() === Empty is True

  10. 19

    A negative index answers a Failure carrying X::OutOfRange with range 0..^Inf, a negative :delete likewise answers a Failure, and a type object is not an index. inferred

    my $i = -1; (1, 2)[$i] is a Failure whose exception range is 0..^Inf

  11. 24

    xx caches a Seq on its left side so it can be repeated. inferred

    ((1..2).Seq xx 2).raku is ((1, 2), (1, 2)).Seq

More from this test: Containers & assignment (7), Exceptions & control flow (1), Stringification (3), Types & coercion (2).

list-of-undefined-scalarRaku++ passesRakudo passes2026-11-25 · fe5df52a · #266
  1. 1

    An undefined value is one item wherever a list is built from it, as any scalar is; only Empty, an empty list and a statement that did not run give none.

    my $x; @$x is (Any,), so for @$x {} runs once and my @a = @$x is [Any]

    Also held by undef-in-list, undefined-item-sources.

  2. 2

    The @ contextualizer makes Nil one item: @(…) of Nil, a missing capture's @<x> included, is (Nil,).

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

    roundrobin takes :slip, which flattens the rounds.

  2. 5

    The sub forms shift @a and pop @a on an empty array return the same Failure as the method forms.

  3. 7

    .produce returns a Seq.

  4. 8

    last inside a reduce or produce block ends the fold, and produce then drops its most recent running value.

More from this test: Hashes & sets (1), I/O & processes (1), Syntax & parsing (2).

live-finite-sources-not-lazyRaku++ passesRakudo passes2026-10-26 · 12af490d
  1. 1

    Channel.list, a handle's .lines and a Seq.from-loop with a condition answer .is-lazy False, and assigning one to an Array reads the source to its end.

  2. 2

    A for over a live finite source such as a handle's .lines walks it as items arrive, and lazy in front of it still makes it lazy.

lizmat-nqp-opsRaku++ passesRakudo passes2026-09-13 · 3a8f2148
  1. 5

    The nqp list ops operate on an IterationBuffer, and a positional subscript on one reads the element stored there.

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

loose-prefixes-and-listop-adverbsRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 3

    The sub forms of the list routines pass an adverb they understand to the method instead of treating it as a list element.

    unique @a, as => {.abs} uniques only the elements of @a

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

map-grep-under-first-stop-earlyRaku++ passesRakudo passes2026-10-14 · b6ac7079
  1. 1

    A .first or .head over a .map/.grep chain runs the blocks only until it has its answer.

    @handlers.map({ … }).grep(*.so).first stops at the first true result

  2. 2

    .first with no matcher over a lazy .map runs the block and answers the first mapped value, and over an endless .grep runs the block only until the first hit. inferred

    (1..*).map(…).first is not Nil

map-return-in-list-assignmentRaku++ passesRakudo passes2026-10-05 · 73ad6c05
  1. 1

    List assignment is eager: inside a routine, my @x = (…).map({ return 5 if …; … }) runs the map at the assignment, so the return leaves the routine.

map-runs-as-it-is-readRaku++ passesRakudo passes2026-11-29 · f9f31192
  1. 2

    What a map or grep answers is a list to every reader (a method, an operator, a routine, a parameter, a loop), even though its block has not run when the reader gets it.

    Also held by map-result-readers.

math-sparsematrix-installRaku++ passesRakudo passes2026-08-31 · b165e3b8
  1. 3

    Reading an element out of a List does not itemize it, so a sublist taken from a List flattens into a slurpy parameter.

    a sublist ("b", "c") read from a List reaches *@indexes as two strings

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

method-not-found-unthrownRaku++ passesRakudo passes2026-11-06 · 104ce4d2
  1. 3

    A hyper method call over an Array or a Hash stores a Nil answer as Any, while over a List the Nil is kept.

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

min-max-mapper-after-adverbRaku++ passesRakudo passes2026-07-27 · 85f7f96d · #7
  1. 1

    The mapper of .min, .max and .minmax is the first Code argument wherever it sits among the arguments, so @a.min(:k, { … }) applies it; :by(&code) is the equivalent named spelling.

minmax-real-rangeRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    .minmax over Rats or Nums answers a Range, as over Ints or Strs, so .minmax.bounds works.

More from this test: Numerics (1).

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

    A Range, like an Array or List, answers .AT-POS, .EXISTS-POS and .slice as the list it stands for.

  2. 2

    $range.in-range($v) is True for a value inside the range and otherwise throws X::OutOfRange naming the value, rather than returning a Failure.

  3. 4

    A Code object is a one-element list for .kv, .pairs, .keys and .values.

More from this test: Dates & times (1), Hashes & sets (1), Regexes & grammars (1), Stringification (1), Strings & Unicode (1).

modifier-for-drains-an-iteratorRaku++ passesRakudo passes2026-09-15 · 43815963
  1. 1

    The statement-modifier form EXPR for CONTAINER iterates an object through its own .iterator, exactly as the block form does.

    is $_, ++$value for @a runs once per element of a class with its own .iterator

modifier-for-over-endless-rangeRaku++ passesRakudo passes2026-11-13 · c109e8ec · rakudo#1398 · rakudo#1399
  1. 1

    The statement-modifier form EXPR for 1..* runs for as long as the range does, with no cap on iterations, as the block form for 1..* { … } does.

    $n++ for 1..* does not stop with $n at 10000

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

    A | slip flattens inside an array composer.

    with @a = <x y>, [|@a, @a[0]] is ["x", "y", "x"]

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

module-fixes-batch-1Raku++ passesRakudo passes2026-07-23 · 009d2c9d
  1. 1

    for over a Blob or Buf iterates its elements, unless the value sits in a Scalar container, where it is one item. inferred

    for blob32.new(1,2,3,4) { } runs 4 times; my $b = …; for $b { } runs once

    Also held by blob-iteration-and-mutate-lvalue.

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

negative-subscriptRaku++ passesRakudo cannot run it2026-08-26 · 76219bd3 · #36
  1. 2

    The positional methods such as .AT-POS do not index from the end for a negative index.

More from this test: Compile-time errors (1).

nqp-iterator-buffer-and-bindattrRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    .iterator.push-all($buffer) fills an IterationBuffer target.

    .iterator.push-all(my $ib := IterationBuffer.new) leaves the values in $ib

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

object-cmp-by-stringyRaku++ passesRakudo passes2026-10-21 · d0a85b2b
  1. 2

    sort, min, max, [max], Zcmp and before over objects order them by cmp's rule, the same from run to run.

  2. 3

    sort, min and max given &infix:<cmp> or &[cmp] use it as a two-argument comparator, so a user multi infix:<cmp> passed to them is called.

More from this test: Operators (1).

one-arg-rule-and-qw-allomorphsRaku++ passesRakudo passes2026-09-08 · 6c9d1d52 · #69
  1. 2

    List.new(...) takes its arguments as elements without flattening them, while Array.new flattens.

    List.new([1,2]) is a one-element list holding the Array

  2. 3

    A single Hash inside an array literal spreads under the one-argument rule.

    [%h] is the hash's Pairs and [{}] is the empty array

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

pdf-family-2026-09Raku++ passesRakudo passes2026-09-14 · a3586267
  1. 19

    A non-nodal hyper method call splices a Slip the method returns into the result.

More from this test: Containers & assignment (8), Exceptions & control flow (1), I/O & processes (1), Modules (1), Numerics (1), Classes, roles & the MOP (14), Operators (1), Regexes & grammars (3), Scoping & phasers (4), Signatures & dispatch (9), Syntax & parsing (11), Types & coercion (3).

pick-negative-and-combinations-rangeRaku++ passesRakudo passes2026-11-10 · 6f4bee22
  1. 1

    .pick with a negative count on a large Range picks nothing.

    (1..5000).pick(-1) is empty

  2. 2

    .pick with a negative count on a list is refused.

    (1,2,3).pick(-1) is refused

  3. 3

    .combinations given a Range of sizes that begins below zero starts at size 0.

    (1,2,3).combinations(-9223372036854775808..1) comes back instead of stepping through every size from the range's start

plain-object-any-list-methodsRaku++ passesRakudo passes2026-11-08 · 586a7f14
  1. 1

    A plain object answers Any's list methods — .max, .min, .Seq, .is-lazy, .invert, .classify, .deepmap, .flatmap, .repeated, .pairup, .produce, .hash and the rest — as a one-item list.

    class P { }; P.new.max does not die

  2. 2

    A plain object answers the subscript protocol (.AT-POS, .EXISTS-KEY): position 0 is the object, another position is out of range, no key exists and nothing is deleted.

  3. 4

    .maxpairs of a scalar keys its pair by the Int 0, not the Str.

More from this test: Exceptions & control flow (1).

rakudo-t-language-gaps-1Raku++ passesRakudo passes2026-10-05 · 892e6c61
  1. 7

    An @ constant keeps a lazy Seq lazy.

More from this test: Compile-time errors (1), Containers & assignment (1), Classes, roles & the MOP (2), Operators (1), Everything else (1), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Stringification (2), Strings & Unicode (1), Syntax & parsing (1).

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

    for $slip iterates the elements of a Slip held in a scalar.

  2. 4

    cmp between an endless Seq and a finite list reads the Seq only as far as needed.

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

rakudo-t-language-gaps-3Raku++ passesRakudo passes2026-10-05 · be813251
  1. 4

    .minpairs and .maxpairs take a key extractor or a comparator.

  2. 5

    .minmax(&key) over Ranges reads them by their ends and keeps their exclusions.

More from this test: Compile-time errors (2), Containers & assignment (1), Modules (1), Classes, roles & the MOP (1), Operators (2), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (1), Stringification (1), Syntax & parsing (1).

rakudo-t-language-gaps-6Raku++ passesRakudo passes2026-10-05 · 93d444fb
  1. 4

    .BIND-POS reifies a lazy array up to the position and refuses a negative position.

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

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

    A lazy list has no .elems, and a Seq does not bind to an @-sigiled name. inferred

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

rakuglaze-round-5Raku++ passesRakudo passes2026-10-03 · 60477ffd
  1. 2

    @$list over a lazy list keeps its source rather than reifying it.

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

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

    deepmap over an Array assigns its leaves into the result's containers, so a Nil leaf becomes Any.

  2. 5

    A […] nested as the sole content of an array composer spreads under the one-argument rule. inferred

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

range-construction-and-membershipRaku++ passesRakudo passes2026-09-22 · 1c853075
  1. 1

    Range.new constructs a Range.

  2. 2

    A Range's element type follows its start, not its end.

    1..4.9 yields (1, 2, 3, 4)

  3. 4

    .int-bounds subtracts for an excluded end only when that end is integral, has a two-argument form, and is defined on infinite ranges.

    (0..^5.5).int-bounds is (0, 5)

  4. 8

    eager $range reifies the Range rather than handing the Range back.

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

range-endpoint-objectsRaku++ passesRakudo passes2026-07-25 · eb83f545
  1. 2

    minmax builds its Range by the same endpoint rule as .., except that two Str extremes stay Strs.

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

range-endpoints-and-adverbsRaku++ passesRakudo passes2026-09-22 · 93b60d8b
  1. 1

    .min and .max on a Range honour their adverbs.

    (2..6).min(:k) is 0

  2. 2

    A Str on the left of .. coerces nothing, so the range iterates strings.

    "1"..9 yields the strings "1" through "9"

  3. 3

    A Real on the left of .. coerces a Str right endpoint to a number.

    1 .. "5" has a numeric end

  4. 4

    An endless range iterates by stepping from its actual start, whether a fraction or a string.

    (1.5..*) starts at 1.5 and ("d"..*) at "d"

  5. 5

    A range starting at -Inf, Inf or NaN does not iterate upward from an integer limit. inferred

range-pick-excluded-endpointRaku++ passesRakudo passes2026-09-29 · 78d68426
  1. 1

    .pick and .roll on an integer Range honour its excluded endpoints at any size.

    (^1024).pick is never 1024 and (0^..1024).pick is never 0

reduce-assoc-and-classify-asRaku++ passesRakudo passes2026-07-26 · bbd131c4
  1. 1

    .reduce and .produce fold from the right when given a right-associative operator as &[OP].

    (2,3,4).reduce(&[**]) is 2**(3**4)

  2. 2

    .classify and .categorize take :as, which maps the stored value while the key still comes from the classifier.

returned-map-is-lazyRaku++ passesRakudo passes2026-10-29 · c0691dff · #60
  1. 1

    A map or grep that is a routine's or closure's value is a lazy Seq whose block runs only for the elements the caller reads.

    .head of a returned map does not run the block for a later element that would die

returned-map-read-by-builtinsRaku++ passesRakudo passes2026-10-30 · c5fd7f1d
  1. 1

    A map or grep Seq returned from a routine is read whole by the built-in subs and operators that walk their arguments: flat, slip, cache, zip, cross, any, first, infix X and the triangle reduce [\+].

    flat(f(), $x) with f returning a .map holds the mapped elements

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

    .reduce with a block whose accumulator parameter is raw folds the elements' containers.

  2. 4

    A for over the value of a block that ends on a variable iterates that variable's container. inferred

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

roast-last-filesRaku++ passesRakudo passes2026-09-28 · 6e9ef4cc
  1. 8

    A nested positional slice keeps the shape of its index list, and a missing element drops out of its own level. inferred

    ("a".."z")[(3, (4, (5,)))] is ("d", ("e", ("f",))) and (^10)[1..2, 3] is ((1, 2), 3)

  2. 9

    An element past the end of a List or Range is Nil, where an Array's is Any. inferred

More from this test: Compile-time errors (1), Containers & assignment (2), Numerics (3), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (2).

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

    A hyper method call over a Seq reads the Seq once. inferred

  2. 11

    deepmap over a typed array keeps the array's type when the results fit it. inferred

  3. 31

    A lazy array's .clone shares its generator but not its storage. inferred

  4. 47

    A map is lazy: a return in its block that runs after the enclosing routine has left throws X::ControlFlow::Return. inferred

  5. 48

    last ends a map over an endless source, and sinking that map runs it. inferred

More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (2), Exceptions & control flow (2), Hashes & sets (4), I/O & processes (3), 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).

rotor-sub-6eRaku++ passesRakudo passes2026-07-27 · d399d9a1
  1. 1

    Under use v6.e.PREVIEW, the rotor sub takes the cycle first and the iterable as its last positional, the reverse of the method, and :partial may follow the iterable.

    rotor(3, 'a'..'h') is (a b c), (d e f)

    Also held by splice-rotor-rettype-and-placeholders.

roundrobin-single-argumentRaku++ passesRakudo passes2026-11-13 · 133560ad · rakudo#1447
  1. 1

    roundrobin follows the single-argument rule: a lone list or Range argument is spread into its elements, which are the lists it takes turns between.

    roundrobin ((1, 2, 3), (4, 5), (6, 7, 8, 9)) takes turns between the three lists, not nine rounds of one

  2. 2

    A lone Array given to roundrobin has containers for elements, each of which is one item.

rw-returns-and-container-traitsRaku++ passesRakudo passes2026-08-30 · 9e00135b
  1. 4

    List.from-iterator($it) and Array.from-iterator($it) drain an iterator into a container of that type.

    List.from-iterator((1, 2, 3).iterator).raku is (1, 2, 3)

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

seq-generator-shapesRaku++ passesRakudo passes2026-07-22 · ce37a93c
  1. 1

    A sequence may consist of a generator closure alone with no seed values, as in { 3+2 } ... *.

seq-lol-and-callable-namedRaku++ passesRakudo passes2026-08-05 · 21d5791b
  1. 5

    The reducing list methods can be called on an undefined invocant. inferred

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

seq-pulled-on-demandRaku++ passesRakudo passes2026-09-27 · 0d048722
  1. 1

    Seq.new($iterator) pulls from its iterator only as the Seq is read, not when the Seq is made.

  2. 2

    A PredictiveIterator's .count-only answers a Seq's .elems and .Numeric without pulling any value, and lets .tail skip to the end.

  3. 3

    .squish(:as, :with) calls its callbacks lazily, once per element and once per adjacent pair, as the reader reaches them.

  4. 5

    Buf.iterator iterates the Buf's elements, not the Buf as one item.

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

seq-read-onceRaku++ passesRakudo passes2026-09-27 · 0d048722
  1. 1

    A second iteration of a Seq that was not cached throws X::Seq::Consumed.

  2. 2

    Every use that keeps a Seq's values (.elems, .Bool, .Str, $s[0], @$s, an operator, a built-in sub, an @ parameter) caches the Seq, after which it can be read any number of times.

  3. 3

    .sink on the Seq of a gather runs the gather's block.

sequence-generator-exclusive-endpointRaku++ passesRakudo passes2026-11-13 · 7dc4809d · rakudo#3881
  1. 1

    A generator sequence with ...^ stops at its excluded endpoint however it is read: printed, joined, assigned to an array, counted or indexed.

    { $++ } ...^ 5 stops before 5

  2. 2

    A Range on the right of ... is a list whose first element is the endpoint and whose rest follows the sequence, for a lone generator too.

    { $++ } ... ^5 is 0 then 1..4

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

    .flat(:hammer) flattens what plain .flat keeps whole: an itemized list or Hash and an Array's elements.

More from this test: Hashes & sets (1).

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

    .max/.min with :k/:v/:kv/:p on an empty collection answer an empty List, not ±Inf.

More from this test: Hashes & sets (2), Operators (2).

shaped-array-assignRaku++ passesRakudo passes2026-08-21 · 874a2002
  1. 1

    A shaped array iterates as its leaves in row-major order: assignment to a plain array, for, flat, | and .Array all see every leaf.

    for my @a[3;2], my @flat = @a has six elements

  2. 2

    .elems of a shaped array is its first dimension, .raku shows the rows, and binding it to an @a parameter keeps the shape.

    for my @a[3;2], @a.elems is 3

slice-list-with-endless-rangeRaku++ passesRakudo passes2026-11-02 · 42618157
  1. 1

    Each Range in a slice index list is a sub-slice of its own, and an endless one stops at the end of the array.

    @a[1, 4..6, 8..Inf] is ("2", ("5", "6", "7"), ("9", "10"))

  2. 2

    An endless Range in a slice index list that lies wholly past the end of the array is dropped from the result.

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

    An arithmetic sequence over Rats stays exact.

    ⅓, ⅔ … 30 hits 15, so .first(15) matches

More from this test: Hashes & sets (3), Regexes & grammars (1), Strings & Unicode (2), Syntax & parsing (1).

slip-array-elements-stay-itemsRaku++ passesRakudo passes2026-10-30 · 21c37405
  1. 1

    |@a passes an Array's elements as the items they are, so a *@ slurpy does not flatten the lists among them, while a List's elements, which are not in Scalars, still flatten.

    f(|@a) for @a = 1, [2, 3] does not give the slurpy [1, 2, 3]

slip-of-unpulled-gatherRaku++ passesRakudo passes2026-10-07 · 59a5f3e1 · #47
  1. 1

    .Slip of a gather Seq that nothing has pulled from yet splices all of its values into a map or for.

    (gather { take 1; take 2 },).map(*.Slip) is not ()

splice-hash-element-2026-09-02Raku++ passesRakudo passes2026-09-02 · 9d5e616c
  1. 1

    A Hash among the replacement arguments of splice is one element, itemized or not; only |%h flattens it, into named arguments that splice ignores.

    @a.splice($i, 0, %h) inserts one Hash element

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

    .splice(*-2, *-1) resolves a WhateverCode start against the array's length and a WhateverCode count against what is left after the start.

More from this test: Hashes & sets (1), Signatures & dispatch (1), Strings & Unicode (1).

statistics-distributions-clusterRaku++ passesRakudo passes2026-08-21 · 41c4e624
  1. 5

    .flat(:hammer) flattens through itemized containers, while :hammer(False) and plain .flat keep itemized Arrays whole.

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

str-range-bounds-and-runawayRaku++ passesRakudo passes2026-07-27 · d4cf6f10
  1. 1

    A Str range is empty when its raw endpoints satisfy min gt max as whole strings, whatever their lengths.

    "Y".."AB" and 'fig'..'banana' are empty

  2. 2

    A non-empty Str range always emits its first endpoint; each successor is then tested against both the end value and the end value's length.

    'aa'..'b' is not empty, and 'a'..'aa' is not just the alphabet

  3. 3

    The length test of a Str range counts codepoints, not bytes.

  4. 4

    ... between two single-codepoint strings walks the codepoints, as .. does.

    '☀' ... '☕' steps from U+2600 to U+2615

More from this test: divergences (1).

sunk-construct-sinks-its-valueRaku++ passesRakudo passes2026-10-29 · 640accf3 · #60
  1. 1

    A sunk if, else, with, given, matched when or default, CATCH, .tap block or whenever sinks its block's value, so a lazy Seq handed back there runs, while in a value position the value is kept as it is.

    f() if $c; runs the gather or lazy map that f returns

superscript-call-but-bool-redo-copy-and-friendsRaku++ passesRakudo passes2026-09-17 · 2e994990
  1. 4

    next inside a duckmap block drops the element.

More from this test: Exceptions & control flow (1), I/O & processes (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1), Types & coercion (1).

todo-small-divergencesRaku++ passesRakudo passes2026-10-10 · 79f0bc7c
  1. 3

    An Array's .kv itemizes its nested containers.

  2. 8

    A Range with a fractional endpoint used as a subscript slices by the Range's members.

  3. 12

    my @a = <lazy seq> makes an Array.

More from this test: Concurrency (1), Containers & assignment (2), Classes, roles & the MOP (2), Operators (1), Regexes & grammars (1), Scoping & phasers (2), Stringification (3), Types & coercion (3).

top100-four-roots-2026-09-02Raku++ passesRakudo cannot run it2026-09-02 · 3f24e005
  1. 1

    zip called with one iterable argument treats that argument as the list of lists to zip.

    zip(((1,2),(3,4))).raku is ((1, 3), (2, 4)).Seq; zip((1,2,3)).raku is ((1, 2, 3),).Seq

More from this test: Modules (1), Native types & NativeCall (1), Operators (1), Everything else (1).

top100-roots-2026-09-02Raku++ passesRakudo does not pass2026-09-02 · 7af75847
  1. 23

    An empty Slip is undefined, so with does not run its block for one.

    Empty.defined is False

More from this test: Containers & assignment (1), Exceptions & control flow (2), Modules (1), Native types & NativeCall (3), Numerics (1), Classes, roles & the MOP (4), Regexes & grammars (3), Scoping & phasers (1), Stringification (1), Strings & Unicode (2), Syntax & parsing (3), Types & coercion (6).

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

    .sort with a two-argument comparator that answers a Bool still orders the list, because the merge takes the right element only when the comparator's result is greater than 0.

  2. 6

    .append($[…]) adds an itemized array as one element.

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

type-objects-as-lists-and-adverbsRaku++ passesRakudo passes2026-07-26 · 15edf2d1
  1. 1

    A type object has no elements, so .pairs, .antipairs, .kv, .keys, .values and .invert are empty and .reduce is Nil, yet .map, .sort, .grep and .unique see it as a one-element list.

  2. 2

    minmax, as sub or method, takes a mapper (positional or :by) that orders the comparison while the resulting endpoints stay the original elements.

  3. 3

    The classify and categorize subs treat adverbs such as :as as options, not list elements.

    categorize(&f, @list, :as(&g)) categorizes only @list

  4. 4

    .repeated takes :as to compare mapped values and :with to supply the comparison.

typed-params-and-upto-loopsRaku++ passesRakudo passes2026-10-05 · 73ad6c05
  1. 2

    A for over ^N or A..^B with a fractional endpoint iterates every integer step below the endpoint, not only those below its integer part.

    for ^2.5 and for 0..^2.5 do not stop at 1

whatever-sub-and-modifier-declRaku++ passesRakudo passes2026-07-24 · 0fc51ec6
  1. 3

    A Slip argument always flattens into grep's list of values, even among several arguments.

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