[cl-unification-devel] newbie; questions on comutivity.

Matthew D. Swank akopa at charter.net
Thu Apr 16 04:22:35 UTC 2009


As someone exposed to unification through languages like prolog and
kanren, I'm a little puzzled as to why the following doesn't seem to
commute:
CL-USER> (let ((e (unify '(42 ?a) '(?a ?b))))
           (values (v? '?b e) (v? '?a e)))
42
42
CL-USER> (let ((e (unify '(?a ?b) '(42 ?a))))
           (values (v? '?b e) (v? '?a e)))
?A
42
CL-USER> 

If this is correct behavior, could someone explain it to me?

Thank you,

Matt

-- 
"You do not really understand something unless you can explain it to
your grandmother." -- Albert Einstein.




More information about the cl-unification-devel mailing list