As we are moving toward typed functional programming by learning about type constructors, type classes, and higher-kinded types, let's introduce Arrow, the functional companion to Kotlin's standard library. Kotlin, as a language, supports FP, and provides us with the required interfaces and language features to use FP in Kotlin; however, since Kotlin doesn't want to force FP and wants to leave the choice of which paradigm to use (that is, functional programming, OOP, or procedural) to the developer, it had to trade-off built-in typed FP.
Now, what is typed functional programming? Let's put it in the simplest terms. You can still use FP without using HK types, functors, monads, or applicatives (functors, monads, and applicatives will be explained later in this chapter), and, as we said earlier, even if you don&apos...