Kotlin, Programming, Software Development, Functional Programming, Coding.
10) val result = numbers.map { it * it } // squares all numbers .filter { it % 5 == 0 } // filters all squared numbers divisible by 5 .first() // fetches the first item println(result) // 25 Now, in this approach, we square all numbers and filter them, only to use one value. That’s inefficient!