Functional programming can be a powerful tool for writing scalable applications as it helps developers to model data and business logic through pure mathematical operations, thereby limiting the management of state, which is one of the biggest challenges in modern object-oriented code.
This chapter will provide the reader with a better understanding of how to achieve functional programming with Kotlin. We'll review some of the benefits of functional programming, examine how Kotlin supports it through top-level and higher-order functions, and then explore how to write more functional code using the Kotlin standard library and Arrow.
This chapter will be broken down as follows:
- The characteristics and benefits of functional programming
- Writing performant higher-order functions
- Utilizing the Kotlin standard library ...