PatternMatchListResult(R, S, L)ΒΆ

patmatch1.spad line 121

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
~=: (%, %) -> 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.
hash: % -> SingleInteger
from SetCategory
hashUpdate!: (HashState, %) -> HashState
from SetCategory
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.

BasicType

CoercibleTo OutputForm

SetCategory