In Chapter 7, Understanding Sorting Algorithms, we dealt a lot with arrays, lists, maps, and other data structures, and we created our custom implementations of them. Thankfully, Kotlin provides you with a wide range of predefined collection data structures for you under the umbrella of the collections framework.
In this chapter, we are going to discuss the collections framework and data operations in Kotlin. Kotlin inherited the collections framework from Java but has made significant improvements to it, making it easier for developers to use the collections framework while applying functional programming constructs.
The collections framework that Kotlin provides is more functional (functional as in functional programming) than Java, and is easier to use and understand.
We will start this chapter with some fundamentals of collections...