Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix thinko about direction
  • Loading branch information
timo committed Dec 26, 2013
1 parent bc572cd commit 53c60ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/operators.pm
Expand Up @@ -169,7 +169,7 @@ sub SEQUENCE($left, Mu $right, :$exclude_end) {
}
}
elsif $tail.elems == 1 {
$code = ($a cmp $endpoint > 0 || $endpoint ~~ Code)?? { $^x.pred } !! { $^x.succ }
$code = ($a cmp $endpoint > 0 && $endpoint !~~ Code)?? { $^x.pred } !! { $^x.succ }
}
elsif $tail.elems == 0 {
$code = {()}
Expand All @@ -182,7 +182,7 @@ sub SEQUENCE($left, Mu $right, :$exclude_end) {
$value := $code(|$tail);
if $end_code_arity != 0 {
$end_tail.push($value);
unless $end_tail.elems < $end_code_arity {
if $end_tail.elems >= $end_code_arity {
$end_tail.munch($end_tail.elems - $end_code_arity) unless $end_code_arity ~~ -Inf;
last if $endpoint(|@$end_tail);
}
Expand Down

0 comments on commit 53c60ca

Please sign in to comment.