Fri Apr 17 07:52:25 UTC 2009 mantoniotti * Fixed a couple of snags. APPLY-SUBSTITUTION was not applied Fixed a couple of snags. APPLY-SUBSTITUTION was not applied recursively and it was barfing on numbers. Current version is still incomplete, but it serves as a template for further development. diff -rN -u old-cl-unification-1/apply-substitution.lisp new-cl-unification-1/apply-substitution.lisp --- old-cl-unification-1/apply-substitution.lisp 2013-07-24 17:42:35.000000000 +0000 +++ new-cl-unification-1/apply-substitution.lisp 2013-07-24 17:42:35.000000000 +0000 @@ -17,6 +17,11 @@ (defgeneric apply-substitution (substitution item &optional exclude-vars)) +(defmethod apply-substitution ((s environment) (n number) &optional exclude-vars) + (declare (ignore exclude-vars)) + n) + + (defmethod apply-substitution ((substitution environment) (s symbol) &optional (exclude-vars ())) (declare (type list exclude-vars)) @@ -26,7 +31,7 @@ s (multiple-value-bind (val foundp) (find-variable-value s substitution) - (cond (foundp val) + (cond (foundp (apply-substitution substitution val exclude-vars)) (t (warn "~S is a free variable in the current environment." s) s))))