PatternMatchable SΒΆ

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.

=: (%, %) -> Boolean

from BasicType

~=: (%, %) -> Boolean

from BasicType

coerce: % -> OutputForm

from CoercibleTo OutputForm

hash: % -> SingleInteger

from SetCategory

hashUpdate!: (HashState, %) -> HashState

from SetCategory

latex: % -> String

from SetCategory

patternMatch: (%, Pattern S, PatternMatchResult(S, %)) -> PatternMatchResult(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.

BasicType

CoercibleTo OutputForm

SetCategory