KotlinSyntax
Filter and Map
Code example
nums.filter { it > 0 }.map { it * 2 }Transforms a collection.
In Kotlin, filter and map: transforms a collection — nums.filter { it > 0 }.map { it * 2 }
nums.filter { it > 0 }.map { it * 2 }nums.filter { it > 0 }.map { it * 2 }Transforms a collection.
Use nums.filter { it > 0 }.map { it * 2 }.
Use this pattern: nums.filter { it > 0 }.map { it * 2 }
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.