In Kotlin is there a more "Kotlin" way to do the following?
fun parse(inputSample: Sample): List<String> =
when {
inputSample.foo != null -> parse(inputSample.foo)
inputSample.bar != null -> parse(inputSample.bar)
else -> emptyList()
}
I suspect that check for null with when can be written differently in Kotlin