I need help with a Programming question. All explanations and answers will be used to help me learn.
Create two lisp functions.
(apply-sub expr sub)_x005F_x000D_ _x005F_x000D_ > (apply-sub '(p ?x (f ?y) b) '((?z ?x) (?w ?y)))_x005F_x000D_ (p ?z (f ?w) b)_x005F_x000D_ _x005F_x000D_ > (apply-sub '(p ?x (f ?y) b) '(((g ?z) ?x) (bill ?y)))_x005F_x000D_ (p (g ?z) (f bill) b)_x005F_x000D_ _x005F_x000D_ (compose sub1 sub2)_x005F_x000D_ _x005F_x000D_ > (compose '((?x ?z) (?w ?y)) '((a ?x) (b ?v)))_x005F_x000D_ ((a ?z) (?w ?y) (a ?x) (b ?v))_x005F_x000D_ _x005F_x000D_ > (compose '(((g ?x ?y) ?z)) '((a ?x) (b ?y) (c ?w) (d ?z)))_x005F_x000D_ (((g a b) ?z) (a ?x) (b ?y) (c ?w))_x005F_x000D_ _x005F_x000D_ (defun isvar (x)_x005F_x000D_ (cond ((null x) nil)_x005F_x000D_ ((pair x) nil)_x005F_x000D_ (t (equal "?" (substring (symbol->string x) 0 1)))_x005F_x000D_ )_x005F_x000D_ )_x005F_x000D_ _x005F_x000D_ > (isvar '?x)_x005F_x000D_ #t_x005F_x000D_ _x005F_x000D_ > (isvar 'bill)_x005F_x000D_ #f