R is PatternMatchable over
S if elements of
R can be matched to patterns over
- patternMatch: (%, Pattern S, PatternMatchResult(S, %)) -> PatternMatchResult(S, %)
patternMatch(expr, pat, res)matches the pattern
patto the expression
expr. res contains the variables of
patwhich are already matched and their matches (necessary for recursion). Initially, res is just the result of new which is an empty list of matches.