sicp-ex-4.69



<< Previous exercise (4.68) | Index | Next exercise (4.70) >>


meteorgan

  
  
  
 (rule (end-in-grandson (grandson))) 
 (rule (end-in-grandson (?x . ?rest)) 
       (end-in-grandson ?rest)) 
  
 (rule ((grandson) ?x ?y) 
       (grandson ?x ?y)) 
 (rule ((great . ?rel) ?x ?y) 
       (and (end-in-grandson ?rel) 
            (son ?x ?z) 
            (?rel ?z ?y)))