Created
April 3, 2015 12:57
-
-
Save akhileshs/5fb8013084b78fa5717b 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
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