nkiesel
03/16/2017, 10:23 PMlistOf(1,2,3).mapNotNull { if (it %2 != 0) "hi ${it}" else null }
but (a) that relies on null
never being a valid result element and (b) does not work for flatMap
. Perhaps I should just use a classical for loop and add to the result list?