Created
October 21, 2013 13:11
-
-
Save Arakaki/7083642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Main { | |
| def main(args:Array[String]) { | |
| //Pimp my library | |
| implicit class SuperInt(val i:Int) { | |
| def square = i * i | |
| def sqrt = math.sqrt(i) | |
| } | |
| println(7.square,49.sqrt) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment