Error report: unify and '

Q&A's, tips, howto's
Locked
Kazimir Majorinc
Posts: 388
Joined: Thu May 08, 2008 1:24 am
Location: Croatia
Contact:

Error report: unify and '

Post by Kazimir Majorinc »

Code: Select all

> (unify '((quote X) (quote Y) (quote Z)) '((quote (a a)) (quote (b b)) (quote (c c))))
((X (a a)) (Y (b b)) (Z (c c)))
> (unify '('X 'Y 'Z) '('(a a) '(b b) '(c c)))
nil
>

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Error report: unify and '

Post by Lutz »

In the current 'unify' implementation quoted expressions like: 'X or '(a a) are seen as atomic and not recursed into, but (quote X) is seen as a list. The 'unify' function doesn't know anything about LISP evaluation rules, it just sees symbolic expressions.

Locked