Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
xx * can also be called with :thunked
  • Loading branch information
TimToady committed Aug 19, 2014
1 parent ebfe24f commit c516d5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/List.pm
Expand Up @@ -629,6 +629,9 @@ multi infix:<xx>(Mu \x, $n is copy, :$thunked!) {
$n = nqp::p6bool(nqp::istype($n, Whatever)) ?? Inf !! $n.Int;
GatherIter.new({ take x.() while --$n >= 0; }, :infinite($n == Inf)).list
}
multi infix:<xx>(Mu \x, Whatever, :$thunked!) {
GatherIter.new({ loop { take x.() } }, :infinite(True)).flat
}
multi infix:<xx>(Mu \x, Whatever) {
GatherIter.new({ loop { take x } }, :infinite(True)).flat
}
Expand Down

0 comments on commit c516d5e

Please sign in to comment.