But it's not a switch, it's called "Pattern Matching."
Pattern matching is way beyond the "Switch Statement"
π
The pattern matching takes a value following match and allows us to write out several potential cases, each defined by case. Where we find a match between the match-case we will execute the respective code. #programming π
Even though it is not a "switch", it can be used as.π