Maybe something like: ```listOf(2, 3, 4).flatMap {...
# stdlib
g
Maybe something like:
Copy code
listOf(2, 3, 4).flatMap { item ->
        List(if (item % 2 == 0) 2 else 1) {
            if (it == 0) item else -item
        }
}
not sure that it is readable enough, but no mutable states