patternp
Patternp is a term used in discussions of pattern matching to denote a boolean predicate that tests whether a value conforms to a specified pattern. In formal terms, patternp(P, v) returns true if the value v matches the structural and literal constraints encoded by the pattern P, and false otherwise. Some presentations allow currying, where patternp(P)(v) performs the same test.
Patterns considered by patternp can be simple or complex. They may include literals, constructors, tuples, lists,
Examples (in pseudo-syntax): patternp([x, _, 3], [1, 2, 3]) yields true, because the first element can be
Patternp is primarily a theoretical concept used to reason about pattern matching, and is also referenced in