Skip to content

Instantly share code, notes, and snippets.

@gtani7
Forked from dcsobral/gist:1120811
Created October 25, 2011 10:52
Show Gist options
  • Select an option

  • Save gtani7/1312277 to your computer and use it in GitHub Desktop.

Select an option

Save gtani7/1312277 to your computer and use it in GitHub Desktop.

Revisions

  1. @dcsobral dcsobral created this gist Aug 2, 2011.
    8 changes: 8 additions & 0 deletions gistfile1.scala
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    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