Skip to content
Permalink
Browse files

Small tweaks to Hyper.pm6

- cannot coerce Any to native int, so de-int $.dwim-left/right
- forgot to change to instances of .do into .infix
  - the idea behind that is that we could handle other ops in the future
    as well with a different method
  • Loading branch information...
lizmat committed Nov 8, 2018
1 parent 0bc72e0 commit 75c9456a8b95eb3b3d144a784884dd482ab12aa3
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/Hyper.pm6
@@ -2,8 +2,8 @@

class Hyper {
has &.operator;
has int $.dwim-left;
has int $.dwim-right;
has $.dwim-left;
has $.dwim-right;

proto method infix(|) {*}

@@ -74,7 +74,7 @@ class Hyper {

nqp::until(
nqp::eqaddr((my \value := iterator.pull-one),IterationEnd),
nqp::push(values, self.op(value,right))
nqp::push(values, self.infix(value,right))
);

my \result := nqp::p6bindattrinvres(
@@ -104,7 +104,7 @@ class Hyper {

nqp::until(
nqp::eqaddr((my \value := iterator.pull-one),IterationEnd),
nqp::push(values, self.op(left,value))
nqp::push(values, self.infix(left,value))
);

my \result := nqp::p6bindattrinvres(

0 comments on commit 75c9456

Please sign in to comment.
You can’t perform that action at this time.