October 2019
Intermediate to advanced
434 pages
11h 54m
English
Throughout this book, we've been making use of collections within our examples. The Kotlin standard library provides helper functions that make the creation of common collection types very easy:
fun main() { val list = listOf("Kotlin", "Java", "Swift") val mutableList = mutableListOf("Kotlin", "Java", "Swift") val arrayList = arrayListOf("Kotlin", "Java", "Swift") val array = arrayOf("Kotlin", "Java", "Swift") val map = mapOf("Kotlin" to 1, "Java" to 2, "Swift" to 3)}
The Kotlin standard library provides numerous functions for working with these collection types once they are created. Through operations such as filter, map, reduce, and find, we can write powerful functional chains that can perform complex tasks with ...
Read now
Unlock full access