PatternMatchPushDown(S, A, B)ΒΆ
patmatch1.spad line 311 [edit on github]
S: SetCategory
A: PatternMatchable S
B: Join(SetCategory, RetractableTo A)
This packages provides tools for matching recursively in type towers.
- patternMatch: (A, Pattern S, PatternMatchResult(S, B)) -> PatternMatchResult(S, B)
patternMatch(expr, pat, res)
matches the patternpat
to the expressionexpr
; res contains the variables ofpat
which are already matched and their matches. Note: this function handles type towers by changing the predicates and calling the matching function provided byA
.