July 2023
Intermediate to advanced
670 pages
17h 13m
English
You’ve seen that data and newtypes can accept type parameters, and even how those type parameters can be used polymorphically, for example, with the reverse function:
| | reverse :: [a] -> [a] |
Types like this that accept type parameters are called higher kinded types. Higher kinded types are a powerful feature that differentiate Haskell types from the generics of many other popular languages. When combined with type classes, higher kinded types allow you to write highly generic and expressive code quickly and easily. In this section, you’ll learn how to make use of higher kinded types to write highly re-usable code, and how to make use of a new language extension, KindSignatures, to allow the ...
Read now
Unlock full access