Skip to content

Commit

Permalink
Add a first cut implementation of infix:<xx> so we can pass all of S0…
Browse files Browse the repository at this point in the history
…3-operators/repeat.t again.
  • Loading branch information
jnthn committed Feb 16, 2010
1 parent b73e000 commit f5d9b53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/core/operators.pm
Expand Up @@ -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:<xx>(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 }
Expand Down
2 changes: 1 addition & 1 deletion t/spectest.data
Expand Up @@ -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
Expand Down

0 comments on commit f5d9b53

Please sign in to comment.