Collections
Finally, we are going to see some code examples where we will begin to deal with a very popular concept: collections. It is important to clarify that, in the next chapter, we are going to work with collections and sequences, but in this part, where we will take a look at collections in the context of lambda, we want to explain with some code examples some details that will allow us to reinforce the lambda concept and continue to understand other concepts in this chapter of the book.
Kotlin leverages functional programming through its collections, and these operations are driven by the use of lambdas. Learning to use lambdas in the context of collections allows developers to get used to writing more functional code, which is a key concept in Kotlin.
Including collections in a chapter about lambdas makes a lot of sense because, in Kotlin, collections and lambdas are closely linked in the context of functional programming.