Skip to content

Commit

Permalink
Fix to infix:<...> so that it returns the first value rather than a r…
Browse files Browse the repository at this point in the history
…eference to the loop variable.
  • Loading branch information
colomon committed Feb 10, 2010
1 parent 0af588e commit 63cafa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/operators.pm
Expand Up @@ -190,7 +190,8 @@ our multi sub infix:<...>($lhs, Code $rhs) {

my $i = $lhs;
gather {
take $i;
my $j = $i;
take $j;
my $last = $i;
loop {
$i = $rhs.($last);
Expand Down

0 comments on commit 63cafa9

Please sign in to comment.