Created
June 13, 2014 07:58
-
-
Save loverdos/6313c0085e5305df74fc to your computer and use it in GitHub Desktop.
Good Lord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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