Yash Grover
12/04/2020, 1:18 PMelse
block too. I once faced a situation where a choice and fallback led to the same action. So I thought this might be something nice to have.
Something like this
fun main():Unit{
var a = 5
when(a){
1,2-> print("Case 1")
5,else -> print("Fallback")
}
}
I don't know if this has been discussed before so I thought I should ask about the suggestion here.dmitriy.novozhilov
12/04/2020, 1:29 PM5
option?
fun main():Unit{
var a = 5
when(a) {
1, 2 -> print("Case 1")
else -> print("Fallback")
}
}
Yash Grover
12/04/2020, 1:55 PM