what's the best way to map a list into a potential...
# stdlib
n
what's the best way to map a list into a potentially longer list? Something like
Copy code
val longer = mutableListOf<Int>()
listOf(2,3,4).forEach { longer.add(it); if (it % 2 == 0) longer.add(-it) }