Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. define (sub-helper1 [] ?t ?f) (?t)
  2.  
  3. define (sub-helper1 (?p :: ?ps) ?t ?f) (if (?p) (then (sub-helper1 ?ps ?t ?f)) (else ?f))
  4.  
  5. define (sub-helper ?x1 ?x2) (if (isVar ?x1) (then ?x2) (else ?x1))
  6.  
  7. define (sub (?x1 (?y1 ?z1)) (?x2 (?y2 ?z2)) (?x3 (?y3 ?z3))) (sub-helper1 ((?x1 == ?x3) :: ((?y1 == ?y3) :: ((?z1 == ?z3) :: []))) ((sub-helper ?x2 ?x3) ((sub-helper ?y2 ?y3) (sub-helper ?z2 ?z3))) (?x3 (?y3 ?z3)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement