Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Created May 9, 2012 08:23
Show Gist options
  • Save missingfaktor/2642944 to your computer and use it in GitHub Desktop.
Save missingfaktor/2642944 to your computer and use it in GitHub Desktop.
// [ Scala ]
// You need to tell compiler that F, T, and A are of kinds (*, *) -> *, * -> *, and * respectively.
// See all those underscores.
trait Foo[F[_, _], T[_], A] {
def foo: F[T[A], A]
}
// [ Haskell ]
// It can infer kinds from context.
{-# LANGUAGE MultiParamTypeClasses #-}
class Foo f t a where
foo :: f (t a) a
// [ F# ]
// It does not support higher kinds.
failwith "Herp derp"
// [ C# ]
// It does not support higher kinds.
throw new Exception("Herp derp.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment