Question: Despite the added complexity, all patterns can still be classified into five cases. The pattern must be either a variable, constant, a (generalized) segment pattern,
Despite the added complexity, all patterns can still be classified into five cases.
The pattern must be either a variable, constant, a (generalized) segment pattern, a (generalized) single-element pattern, or a cons of two patterns. The following definition of pat -match reflects the five cases (along with two checks for failure):
(defun pat-match (pattern input &optional (bindings no-bindings))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
