Here are some addition pattern forms that are useful:
p1 | ... | pn: an "or" pattern; matching against it succeeds if a match succeeds against any of the individual patterns
pi, which are tried in order from left to right. All the patterns must bind the same variables.
(p : t): a pattern with an explicit type annotation.
cmeans any constant, such as integer literals, string literals, and booleans.
chmeans a character literal. For example,
'A'..'Z'matches any uppercase letter.
p when e: matches
pbut only if
You can read about all the pattern forms in the manual.