patmatch1.spad line 165 [edit on github]
A set R is PatternMatchable over S if elements of R can be matched to patterns over S.
patternMatch(expr, pat, res) matches the pattern pat to the expression expr. res contains the variables of pat which are already matched and their matches (necessary for recursion). Initially, res is just the result of new which is an empty list of matches.