https://kotlinlang.org logo
#getting-started
Title
# getting-started
n

nkiesel

03/17/2017, 4:23 PM
so
listOf(1,2,3).flatMap { if (it%2 != 0) listOf("hi $it") else emptyList() }
would do the trick for my little example. Looks like a nice way. is it also efficient?