Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
in sequence operator, avoid over-eager munching of elements. diakopter++
  • Loading branch information
moritz committed May 31, 2012
1 parent b057f6f commit 9cd99ac
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/operators.pm
Expand Up @@ -103,10 +103,13 @@ sub SEQUENCE($left, $right, :$exclude_end) {
take $value;
}
unless $stop {
$tail.munch($tail.elems - 3) if $tail.elems > 3;
my $a = $tail[0];
my $b = $tail[1];
my $c = $tail[2];
my ($a, $b, $c);
unless $code.defined {
$tail.munch($tail.elems - 3) if $tail.elems > 3;
$a = $tail[0];
$b = $tail[1];
$c = $tail[2];
}
if $code.defined { }
elsif $tail.grep({ $_ ~~ Numeric}).elems != $tail.elems {
# non-numeric
Expand Down

0 comments on commit 9cd99ac

Please sign in to comment.