Given a is an array, I'd like to use pattern matching to find out whether a's an empty array. From other functional languages, I would assume that there exists some literal, e.g., [], that represents an empty array, and I can just match against it, like so:
val a: Array<Int> = ...
when (a) {
[] -> println("empty")
else -> println("not empty")
}
Is this possible in Kotlin?