Join Slack
Powered by
Why that doesn't work for `flatMap`? AFAIK, `flatM...
# getting-started
i
ilya.gorbunov
03/17/2017, 4:09 PM
Why that doesn't work for
flatMap
? AFAIK,
flatMap
is fine by itself:
Copy code
listOf(1,2,3).flatMap { if (it%2 != 0) listOf(it, it-1) else emptyList() }
Open in Slack
Previous
Next