Skip to content

Instantly share code, notes, and snippets.

@dcsobral
Created August 2, 2011 18:11
Show Gist options
  • Save dcsobral/1120811 to your computer and use it in GitHub Desktop.
Save dcsobral/1120811 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