Variable patterns
Patterns in case expressions can also assign variables.
When a variable name is used in a pattern the value that is matched against is assigned to that name, and can be used in the body of that clause.
Patterns in case expressions can also assign variables.
When a variable name is used in a pattern the value that is matched against is assigned to that name, and can be used in the body of that clause.