Skip to content

Commit

Permalink
Add infix:<**>(Rat $a, Int $b).
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Sep 12, 2010
1 parent 9734b29 commit fdae00f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Rat.pm
Expand Up @@ -106,4 +106,8 @@ multi sub infix:</>(Int $a, Int $b) {
Rat.new($a, $b);
}

multi sub infix:<**>(Rat $a, Int $b) {
($a.numerator ** $b) / ($a.denominator ** $b);
}

# vim: ft=perl6 sw=4 ts=4 expandtab

0 comments on commit fdae00f

Please sign in to comment.