PatternMatchListResult(R, S, L)

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.

= : (%, %) -> Boolean
from BasicType
atoms : % -> PatternMatchResult(R, S)

atoms(r) returns the list of matches that match atoms (elements of the lists).

coerce : % -> OutputForm
from CoercibleTo(OutputForm)
failed : () -> %

failed() returns a failed match.

failed? : % -> Boolean

failed?(r) tests if r is 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.

~= : (%, %) -> Boolean
from BasicType

CoercibleTo(OutputForm)

SetCategory

BasicType