Introducing Functional Programming
This chapter will discuss the fundamental principles of functional programming and how they fit into the Kotlin programming language.
As you’ll discover, some of the concepts covered in this chapter have already been explored earlier in the book, as it would have been hard to discuss the benefits of the language up until now without touching on functional programming concepts such as data immutability and functions as values. We’ll look at these features from a different angle, though, and see how they fit into the wider functional programming paradigm.
In this chapter, we will cover the following topics:
- Reasoning behind the functional approach
- Immutability
- Functions as values
- Using expressions instead of statements
- Recursion
After completing this chapter, you’ll understand how the concepts of functional programming are embedded in the Kotlin language and when to use them.
...