Skip to content

Instantly share code, notes, and snippets.

@vvviiimmm
Last active February 17, 2017 23:59
Show Gist options
  • Save vvviiimmm/44825ac30cbc3a9e63f1f58144bd6d07 to your computer and use it in GitHub Desktop.
Save vvviiimmm/44825ac30cbc3a9e63f1f58144bd6d07 to your computer and use it in GitHub Desktop.
implicit def intToStr(num: Int): String = s"The value is $num"
42.toUpperCase() // evaluates to "THE VALUE IS 42"
def functionTakingString(str: String) = str
// note that we're passing int
functionTakingString(42) // evaluates to "The value is 42"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment