6.3.1. What Is match?


match allows a value to be compared against a series of patterns and executes the code corresponding to the matching pattern. Patterns can be literals, variable names, wildcards, and more.

Think of a match expression as a coin-sorting machine: coins slide down a track with holes of different sizes, and each coin falls...