Skip to content

Instantly share code, notes, and snippets.

@Arakaki
Created October 21, 2013 13:11
Show Gist options
  • Save Arakaki/7083642 to your computer and use it in GitHub Desktop.
Save Arakaki/7083642 to your computer and use it in GitHub Desktop.
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