Last active
September 3, 2018 21:41
-
-
Save manjuraj/05d1c913473d61d51767 to your computer and use it in GitHub Desktop.
infix syntax for generic type
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
// | |
// References | |
// - http://jim-mcbeath.blogspot.com/2008/11/scala-type-infix-operators.html | |
// | |
// | |
// Notes: | |
// - a generic type op[T1, T2] can be written T1 op T2 | |
// | |
scala> val a: Tuple2[Int, String] = (1, "one") | |
a: (Int, String) = (1,one) | |
scala> val a: Int Tuple2 String = (1, "one") | |
a: (Int, String) = (1,one) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment