Lambda-Map Performance in Kotlin

Kotlin Bytecode

Working on an enterprise application written in Kotlin, I’ve recently noticed something that felt “off” to me. Perhaps you’ve seen it, perhaps you’ve written it — maybe even recently!  It looks something like this (I call this a Lambda-Map): object Demo { fun main() { listOf(1,2,3,4).map { plusOne(it) } } private fun plusOne(i: Int): Int […]