Tuple Patterns
Tuple patterns can simultaneously match and destructure multiple elements of a tuple. The syntax is case (pattern1, pattern2, ...) =>, where each position can be a value pattern, binding pattern, or wildcard.
You can mix different types of patterns. For example, case (0, 0) matches the origin, case (x, 0) matches points on the x-axis and binds the x coordinate to a variable, and case (x, y) matches and binds both coordinates.
Tuple patterns make code more concise—extracting multiple values in a single match without needing to match the tuple first and then access elements separately.
Try changing point on line 2 to (0, 0) or (5, 3) and observe the different matching results.