Skip to content

Instantly share code, notes, and snippets.

@loverdos
Created June 13, 2014 07:58
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 loverdos/6313c0085e5305df74fc to your computer and use it in GitHub Desktop.
Save loverdos/6313c0085e5305df74fc to your computer and use it in GitHub Desktop.
Good Lord
implicit class GoodLord(val Good: Int) extends AnyVal {
def Lord = Good
}
// and then in a Scala prompt:
// scala> 1.Good.Lord
// res0: Int = 1
// Also:
// scala> 1.Good.Lord.Good.Lord.Good.Lord
// res1: Int = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment