Chapter 20: Pattern Matching
大綱
If and guard
Switch
for
Wildcard pattern
Value-binding pattern
Identifier pattern
Tuple pattern
Enumeration case pattern
Optional pattern
”Is” type-casting pattern
”As” type-casting pattern
”Qualifying with where
Chaining with commas
Custom tuple
Validate that an optional exists
Organize an if-else-if
Expression pattern
Overloading ~=
Key points
Last updated