patmatch1.spad line 807 [edit on github]
This package provides pattern matching functions on function spaces.
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.