Another obscure thing for me, why is this kind of ...
# announcements
v
Another obscure thing for me, why is this kind of mapping not possible?
Copy code
fun main() {
    val a = listOf(listOf(32,53,23), listOf(13), listOf(34))
    val its = a.map(it.iterator())
    println(its)
}
map(it.iterator())
l
a.map { it.iterator() }
👍 1
v
🙂 Thanks. I've not been using Kotlin for few month and totaly forgot
Forgot that lambdas are passed without braces
g
It would be much easier with IDE help
Easy to identify what is required and is not working
v
Yep, I saw this thing, but could not understand at once, 'cause it doesn't say explicitly, that I should replace
( )
with
{ }
. Just forgot Kotlin synax 🤷‍♂️
g
it says that
it
doesn’t exist and that type param is actually lambda