map, filter & fold in Shared Code
Functional collection operators you can rely on cross-platform.
Transform Without Loops
Kotlin gives collections functional operators that transform data cleanly. They all run identically in shared multiplatform code.
map Reshapes Each Item
map applies a function to every element and returns a new list of the results, leaving the original untouched.
val nums = listOf(1, 2, 3)
val doubled = nums.map { it * 2 }All lessons in this course
- Strings, Numbers & Collections Everywhere
- map, filter & fold in Shared Code
- Dates with kotlinx-datetime
- What Is NOT in Common stdlib