Skip to content

Instantly share code, notes, and snippets.

@ochafik
Created February 20, 2013 09:51
Show Gist options
  • Save ochafik/4994362 to your computer and use it in GitHub Desktop.
Save ochafik/4994362 to your computer and use it in GitHub Desktop.
implicit def Extensions(self: Any) = new Extensions(self)
class Extensions(self: Any) {
def quoted(quote: String) = quote + self + quote
}
println(10.quoted("'")) // prints "'10'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment