In Kotlin, there are a number of function variations that we can write, and by leveraging these function types we can take advantage more fully of the Kotlin language.
In this section, we'll take a look at a number of the function types, including the following:
- Top-level functions
- Class functions
- Local functions
- Single expression functions
- Infix functions
- Extension functions