Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Introduce Pos is Int where 0 is still True
  • Loading branch information
lizmat committed Jul 24, 2015
1 parent af22999 commit 9582ebc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Int.pm
Expand Up @@ -162,6 +162,8 @@ my class Int does Real { # declared in BOOTSTRAP
}
}

my class Pos is Int { multi method Bool(Pos:) { self.defined } }

multi sub prefix:<++>(Int:D $a is rw) {
$a = nqp::add_I(nqp::decont($a), 1, Int);
}
Expand Down

0 comments on commit 9582ebc

Please sign in to comment.