Arrow's type hierarchy

There is a limitation in Kotlin's types system—it doesn't support Higher-Kinded Types (HKT). Without getting too much into type theory, an HKT is a type that declares other generic values as type parameters:

class MyClass<T>() //Valid Kotlin codeclass MyHigherKindedClass<K<T>>() //Not valid kotlin code

Lacking HKT is not great for Kotlin concerning functional programming, as many advanced functional constructs and patterns use them.

The Arrow team is working on Kotlin Evolution and Enhancement Process (KEEP)—the community process for adding new language features, called Type Classes as extensions in Kotlin (https://github.com/Kotlin/KEEP/pull/87) to support HKT and other features. At this very moment, it isn't clear ...

Get Functional Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.