Created
August 3, 2017 15:52
-
-
Save knightpop/ecb34e2b073d47048b1d0553b961070f 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
implicit val string: String = "Hello" | |
implicit val boolean: Boolean = true | |
implicit val int: Int = 0 | |
def getImplicitT[T](implicit t: T): T = t | |
getImplicitT[Int] | |
getImplicitT[String] | |
getImplicitT[Boolean] | |
type Id[A] = A | |
def getImplicitlyT[T : Id]: T = implicitly[Id[T]] | |
getImplicitlyT[Int] | |
getImplicitlyT[String] | |
getImplicitlyT[Boolean] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment