In Chapter 4, Functions in Kotlin, we introduced Kotlin's support for functions and the various features we can use while writing functions. In this chapter, we continue on that theme by discussing higher-order functions and how we can use them to write cleaner and more expressive code.
In this chapter, we will cover the following topics:
- Higher-order functions and closures
- Anonymous functions
- Function references
- Functional programming idioms
- Custom domain-specific language (DSLs)