So `flatMap { buildSequence { }}` actually looks n...
# stdlib
g
So
flatMap { buildSequence { }}
actually looks nice for this case and works, you just need coroutines for that:
Copy code
listOf(2, 3, 4).flatMap { buildSequence {
        yield(it)
        if (it % 2 == 0) yield(-it)
}.toList() }