PatternMatchListResult(R, S, L)ΒΆ
patmatch1.spad line 121 [edit on github]
R: SetCategory
S: SetCategory
L: ListAggregate S
A PatternMatchListResult is an object internally returned by the pattern matcher when matching on lists. It is either a failed match, or a pair of PatternMatchResult, one for atoms (elements of the list), and one for lists.
- atoms: % -> PatternMatchResult(R, S)
atoms(r)
returns the list of matches that match atoms (elements of the lists).
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- failed?: % -> Boolean
failed?(r)
tests ifr
is a failed match.
- failed: () -> %
failed()
returns a failed match.
- latex: % -> String
from SetCategory
- lists: % -> PatternMatchResult(R, L)
lists(r)
returns the list of matches that match lists.
- makeResult: (PatternMatchResult(R, S), PatternMatchResult(R, L)) -> %
makeResult(r1, r2)
makes the combined result [r1
,r2
].
- new: () -> %
new()
returns a new empty match result.