Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix "Too many positionals passed" in METAOP_ZIP
The METAOP_REDUCE_* reducers expect only a single iterable while plain ops
require arguments passed separately.
Have to reify the mapped iterators to a List to avoid "This Seq has already
been iterated" errors.
  • Loading branch information
niner committed Aug 25, 2015
1 parent 42c2d81 commit 27cb277
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/metaops.pm
Expand Up @@ -90,8 +90,10 @@ sub METAOP_ZIP(\op, &reduce) {
last if value =:= IterationEnd;
value
};
last if z.elems < $arity;
take-rw $rop(|z);
my $z = List.from-iterator(z.iterator);
$z.eager;
last if $z.elems < $arity;
take-rw $arity == 2 ?? $rop(|$z) !! $rop(@$z);
}
}
}
Expand Down

0 comments on commit 27cb277

Please sign in to comment.