Scala is one of the few languages that have higher-kinded types; a simple feature with profound implications. This talk will explore uses of higher-kinded types and show why they are an indispensable feature.
Traversing a List def traverse[F[_]: Applicative, A, B] (as: List[A])(f: A => F[B]): F[List[B]] = as.foldRight(List.empty[B].pure[F]) { case (a, acc) => f(a).product(acc).map { case (b, bs) => b :: bs } }
• Generics of a Higher Kind • Higher-kinded types: the difference between giving up, and moving forward • Scala PR #5102: Add support for partial unification of type constructors • Explaining Miles's Magic • SI-2712: Implement higher-order unification for type constructor inference Further Reading