Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
implement Num.succ
  • Loading branch information
moritz committed Jun 7, 2011
1 parent fa5da99 commit 25cd9f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CORE.setting/Num.pm
Expand Up @@ -9,6 +9,11 @@ my class Num {
pir::perl6_box_str__PS(pir::repr_unbox_num__NP(self));
}

# TODO: replace 1.Num with a Num literal once they are implemented
proto method succ(|$) {*}
multi method succ(Num:D:) { self + 1.Num }
multi method succ(Num:U:) { 1.Num }

proto method log(|$) {*}
multi method log() {
pir::perl6_box_num__PN(pir::ln__NN(pir::repr_unbox_num__NP(self)));
Expand Down

0 comments on commit 25cd9f7

Please sign in to comment.