Permalink
Browse files

implement Int.sqrt

  • Loading branch information...
1 parent 33047f8 commit f1fc5edf75f164b4e8abb430fc542ac5dca43b27 @moritz moritz committed Jul 1, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/Int.pm
View
2 src/core/Int.pm
@@ -29,6 +29,8 @@ my class Int {
method succ(Int:D:) { self + 1 }
method pred(Int:D:) { self - 1 }
+
+ method sqrt() { self.Num.sqrt }
}
multi prefix:<++>(Int:D \$a is rw) { # XXX

0 comments on commit f1fc5ed

Please sign in to comment.