模式匹配的主要部分是关于要使用什么样的表达式。
The main part of pattern matching is coming up with the expression to use.
括号对与可能组成部分替换模式的“子表达式”匹配。
Sets of parentheses match "subexpressions" that can potentially make up part of the replacement pattern.
在这个示例中,使用模式匹配提取列表的开头和结尾部分。
In that example, pattern matching was used to extract both the head and the tail of the list.
应用推荐