Created
August 17, 2016 20:47
-
-
Save HDBandit/fd3557014d980805d3120cddb00d8bd2 to your computer and use it in GitHub Desktop.
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
object Speed { | |
implicit def Int2Speed(value: Int): Speed = new Speed(value) | |
} | |
case class Speed(value: Int) { | |
def km_hour: Speed = this | |
def milles_hour: Speed = this | |
def meters_second: Speed = this | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment