For the More Curious: Arrow.kt
In this chapter you saw some of the functional programming-style tools that are included in Kotlin’s standard library, like map, flatMap, and filter.
Kotlin is a “multiparadigm” language, meaning it mixes the styles of object-oriented, imperative, and functional programming. If you have worked with a strictly functional programming language like Haskell, you know that Haskell offers useful functional programming ideas that go further than the basics included in Kotlin.
For example, Haskell includes the Maybe type – a type that includes support for either something or an error – and allows operations that might result in an error to be represented using a type instead. Using a Maybe type allows you to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access