Skip to content

Instantly share code, notes, and snippets.

@manjuraj
Last active September 3, 2018 21:41
Show Gist options
  • Save manjuraj/05d1c913473d61d51767 to your computer and use it in GitHub Desktop.
Save manjuraj/05d1c913473d61d51767 to your computer and use it in GitHub Desktop.
infix syntax for generic type
//
// 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