previous | index | next

Returning Wild-card Substitutions

substitutions-in-to-match knows that its arguments match already.

It just needs to return the wild-card substitution that makes them match:

     (substitutions-in-to-match
       '(who acted in ...)
       '(who acted in boyz n the hood)) ⇒ ((boyz n the hood))
Q: Why not just (boyz n the hood)?

A: Because the query system will later allow more than one wild-card in the pattern, for example,

     (what movies were made between _ and _ )
"_" is another kind of wild-card introduced next.

substitutions-in-to-match is left as an exercise (7.26).


previous | index | next