Skip to content

Instantly share code, notes, and snippets.

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