LISP has many different ideas of equality. Numerical equality is
=. Two symbols are
eq if and only if they are
copies of the same list are not
eq, but they are equal.
> (eq 'a 'a) T > (eq 'a 'b) NIL > (= 3 3) T > (= 3 4) NIL > (eq '(a b c) '(a b c)) NIL > (equal '(a b c) '(a b c)) T > (eql 'a 'a) T > (eql 3 3) T
eql predicate is equivalent to
eq for symbols and to
= for numbers.
equal predicate is equivalent to
eql for symbols and
numbers. It is
true for two conses if and only if their cars are equal and their cdrs
are equal. It is true for two structures if and only if the structures
are the same type and their corresponding fields are equal.