for example, when you call `listOf(1, 2, 3).map { ...
# getting-started
l
for example, when you call
listOf(1, 2, 3).map { it * 2 }
, the compiler takes your
{ it * 2}
lambda and the things that map does with it (most likely call it inside a for loop or something) and replaces your
.map
call with the implementation of
map
. This makes
.map
have no additional overhead over a for-loop
👍 1