As we saw in Chapter 3, Understanding Programming Paradigms in Kotlin, functional programming is a declarative programming paradigm in which programs are expressed using pure mathematical functions. In this section, we'll examine what this means in practice and why you might want to embrace functional programming with Kotlin.
Understanding functional programming
Pure functions
One of the core tenets of functional programming is the transformation of data through the application of pure functions. According to the strictest definitions of functional programming, these pure functions are expressed as mathematical operations. This pure, mathematical nature of functional programming gives rise to two interesting properties...