Skip to content

Instantly share code, notes, and snippets.

@ekmett
Created December 1, 2010 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekmett/724294 to your computer and use it in GitHub Desktop.
Save ekmett/724294 to your computer and use it in GitHub Desktop.
trait HomClass { self =>
type L
type H>:L
type C[_>:L<:H,_>:L<:H]
type Dual <: HomClass {
type L=self.type#L
type H=self.type#H
type C[A>:L<:H,B>:L<:H] = self.type#C[B,A]
type Dual = self.type
}
}
object foo extends HomClass { type L = Nothing; type H = Nothing; type C[A,B] = Int => Double }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment