Skip to content

Instantly share code, notes, and snippets.

@knightpop
Created August 3, 2017 15:52
Show Gist options
  • Save knightpop/ecb34e2b073d47048b1d0553b961070f to your computer and use it in GitHub Desktop.
Save knightpop/ecb34e2b073d47048b1d0553b961070f to your computer and use it in GitHub Desktop.
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