Skip to content

Instantly share code, notes, and snippets.

multi sub HYPER(&operator, Iterable:D \left, Iterable:D \right, :$dwim-left, :$dwim-right) {
my @result;
my \lefti := left.iterator;
my \righti := right.iterator;
# Check whether any side is lazy. They must not be to proceed.
if lefti.is-lazy {
X::HyperOp::Infinite.new(:side<both>, :&operator).throw if righti.is-lazy;
X::HyperOp::Infinite.new(:side<left>, :&operator).throw;