In the last two chapters, we learned about functions and function types in functional programming. We also learned about the various types of function Kotlin has to offer.
This chapter is based on delegates in Kotlin. Delegates are awesome features of Kotlin in favour of functional programming. If you are coming from a non-FP background such as Java, you are probably hearing about delegates for the first time. So in this chapter, we will try to untangle things for you.
We will start by learning the basics of delegation and then gradually move into implementations of delegates in Kotlin.
The following list contains the topics that will be covered in this chapter:
- Introduction to delegation
- Delegates in Kotlin
- Delegated properties
- Standard delegates
- Custom delegates
- Delegated map
- Local delegation
- Class delegation
So, let's get started with delegates.
...