There are several types of function in Kotlin that all have their unique traits and uses. Understanding these function types and when to use them is an important part of fully embracing Kotlin. By taking advantage of Kotlin's different function types, you'll be able to write cleaner, safer, and more idiomatic code.
Next, you'll see a subset of the function types that will be discussed, including top-level functions, extension functions, and higher-order functions. In Chapter 4, First-Class Functions, we will explore in some depth Kotlin's support for functions, their flexibility, and the different variations of functions available.