Skip to content

Instantly share code, notes, and snippets.

@gtani7
Forked from dcsobral/gist:1120811
Created October 25, 2011 10:52
Show Gist options
  • Save gtani7/1312277 to your computer and use it in GitHub Desktop.
Save gtani7/1312277 to your computer and use it in GitHub Desktop.
Existential _ vs Higher-kind _
scala> def f[A[_] <: Seq[_]](f: A[Int]) = f.head
f: [A[_] <: Seq[_]](f: A[Int])A
scala> def f[A[_] <: Seq[t] forSome { type t }](f: A[Int]) = f.head
f: [A[_] <: Seq[_]](f: A[Int])A
scala> def f[A[t] <: Seq[_] forSome { type t}](f: A[Int]) = f.head
f: [A[t] <: Seq[_] forSome { type t }](f: A[Int])A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment