Chapter 4. Functions in Kotlin
In the previous chapters, we introduced the basics of Kotlin and how to write procedural and object-oriented code. The emphasis in this chapter will be on functions; how to take the first steps into functional programming; and the features that Kotlin supports, which makes programming with functions easier.
In this chapter, we will cover the following topics:
Functions and function literals
Extension functions
Named parameters and default parameters
Operator overloading
Recursion and tail recursion