diff --git a/src/core/operators.pm b/src/core/operators.pm index 278e95fbe4c..498414ba5a3 100644 --- a/src/core/operators.pm +++ b/src/core/operators.pm @@ -159,6 +159,15 @@ our multi infix:($a, $b) { pir::isne__INN(+$a, +$b) ?? True !! False } +# XXX Lazy version would be nice in the future too. +our multi infix:(Mu \$item, $n) { + my @result = (); + for 1..$n { + @result.push($item); + } + @result +} + our multi prefix:<|>(@a) { @a.Capture } our multi prefix:<|>(%h) { %h.Capture } our multi prefix:<|>(Capture $c) { $c } diff --git a/t/spectest.data b/t/spectest.data index 5504c26ce2f..40508d20bd9 100644 --- a/t/spectest.data +++ b/t/spectest.data @@ -149,7 +149,7 @@ S03-operators/range.t # S03-operators/reduce-le1arg.t # S03-operators/reduce-metaop.t S03-operators/relational.t -# S03-operators/repeat.t +S03-operators/repeat.t S03-operators/scalar-assign.t # S03-smartmatch/any-any.t # S03-smartmatch/any-array-slice.t