patmatch1.spad line 121 [edit on github]
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(r) returns the list of matches that match atoms (elements of the lists).
failed() returns a failed match.
failed?(r) tests if r is a failed match.
lists(r) returns the list of matches that match lists.
makeResult(r1, r2) makes the combined result [r1, r2].
new() returns a new empty match result.