michael.hunger
06/13/2018, 9:53 AMgetOrElse
in Array that just takes a literal default not like currently a function from index to value ?
I know you can do array.getOrNull(idx) ?: defaultValue
but it reads more verboseilya.gorbunov
06/13/2018, 2:13 PMgetOrElse
? Note that it is inlined, so there's no object allocated for the function.