The next step is to define the predicates that recognize generalized segment and single-element patterns, and the
Question:
The next step is to define the predicates that recognize generalized segment and single-element patterns, and the matching functions that operate on them. We could implement segmen t -matcher and s i ngl e -matcher withcase statements that consider all possible cases. However, that would make it difficult to extend the matcher. A programmer who wanted to add a new kind of segment pattern would have to edit the definitions of both segment - pattern - p and segment -matcher to install the new feature. This by itself may not be too bad, but consider what happens when two programmers each add independent features. If you want to use both, then neither version of segment-matcher (or segment-pattern-p) will do. You'll have to edit the functions again, just to merge the two extensions.
Step by Step Answer:
Paradigms Of Artificial Intelligence Programming Case Studies In Common Lisp
ISBN: 9781558601918
1st Edition
Authors: Peter Norvig