Question: Here are two examples using ?f .i The first succeeds because (+ 3 4) is indeed 7, and the second fails because (> 3 4
Here are two examples using ?f .i The first succeeds because (+ 3 4) is indeed 7, and the second fails because (> 3 4 is false.
> (pat-match '(?x ?op ?y i s ?z (?if (eql (?op ?x ?y) ?z)))
'(3 + 4 i s 7))
((?Z . 7) (?Y . 4) (?OP . +) (?X . 3))
> (pat-match '(?x ?op ?y (?if (?op ?x ?y)))
'(3 > 4))
NIL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
