Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLR-ize METAOP_REDUCE_LIST (triangle form; the other one does not nee…
…d changes)
  • Loading branch information
moritz committed Aug 20, 2015
1 parent 91fc607 commit 8afab2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/metaops.pm
Expand Up @@ -180,15 +180,15 @@ multi sub METAOP_REDUCE_LIST(\op, \triangle) {
my $ :=
#?endif
sub (*@values) {
return () unless @values.gimme(1);

GATHER({
my \res = GATHER({
my @list;
while @values {
@list.push(@values.shift);
for @values -> \v {
@list.push(v);
take op.(|@list);
}
}, :infinite(@values.infinite));
});
@values.is-lazy ?? res.lazy !! res;
}
}
multi sub METAOP_REDUCE_LIST(\op) {
Expand Down

0 comments on commit 8afab2e

Please sign in to comment.