Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow DWIM RHS of infix HYPER to be lazy
If the right hand side of an infix hyper like >>+>> is DWIM (the pointy
end points outwards), it may actually be lazy (even infinite) because we
shorten it to the length of the left hand side anyway.

Fixes (0,0,0,0,0,0) >>+>> (Slip(1,2) xx *)
  • Loading branch information
niner committed Aug 28, 2015
1 parent bf1307e commit 94e6d13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/metaops.pm
Expand Up @@ -393,7 +393,7 @@ multi sub HYPER(&operator, Iterable:D \left, Iterable:D \right, :$dwim-left, :$d
X::HyperOp::Infinite.new(:side<both>, :&operator).throw if right-iterator.is-lazy;
X::HyperOp::Infinite.new(:side<left>, :&operator).throw;
}
X::HyperOp::Infinite.new(:side<right>, :&operator).throw if right-iterator.is-lazy;
X::HyperOp::Infinite.new(:side<right>, :&operator).throw if right-iterator.is-lazy and not $dwim-right;

my class DwimIterator does Iterator {
has $!source;
Expand Down

0 comments on commit 94e6d13

Please sign in to comment.