Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #385 from usev6/nom
Flatten return values from SEQUENCE
  • Loading branch information
lizmat committed Mar 16, 2015
2 parents 748e695 + cd51b34 commit 88cc986
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/operators.pm
Expand Up @@ -198,7 +198,12 @@ sub SEQUENCE($left, Mu $right, :$exclude_end) {
last if $value ~~ $endpoint;
}
$tail.push($value);
take $value;
if $value {
take $value.flat
}
else { ## special case for returning ()
take $value;
}
}
}
elsif $badseq {
Expand Down

0 comments on commit 88cc986

Please sign in to comment.