values, and I'd like to match on combinations. I could of course nest them, but I was hoping to match on a tuple like thing...
e.g.
when (status, newState) {
42, 13 -> "The answer is bad luck"
}
n
nanodeath
03/17/2021, 11:34 PM
I think you're looking for pattern matching, which Kotlin isn't the best at, compared to some languages
nanodeath
03/17/2021, 11:34 PM
you might be able to use Pair to match those, but it'd end up allocating multiple objects