Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created December 23, 2019 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djspiewak/d7ba382f9d80be123699698ebb9ccd32 to your computer and use it in GitHub Desktop.
Save djspiewak/d7ba382f9d80be123699698ebb9ccd32 to your computer and use it in GitHub Desktop.
class Foo {
def bar(i: Int): String = i.toString
}
object Foo {
implicit class Syntax(val self: Foo) extends AnyVal {
def baz(b: Boolean): String = b.toString
}
}
val f = new Foo
f.bar(42) // => "42"
f.baz(true) // => "true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment