Skip to content

Instantly share code, notes, and snippets.

@akhileshs
Created April 3, 2015 12:57
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 akhileshs/5fb8013084b78fa5717b to your computer and use it in GitHub Desktop.
Save akhileshs/5fb8013084b78fa5717b to your computer and use it in GitHub Desktop.
scala> trait Plus[A] {
| def plus(a1: A, a2: A): A
| }
defined trait Plus
scala> def plus[A : Plus](a1: A, a2: A): A = implicitly[Plus[A]].plus(a1, a2)
plus: [A](a1: A, a2: A)(implicit evidence$1: Plus[A])A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment