The 'eq' predicate function checks to see if 'expr1' and 'expr2' are identical. T is returned if they are exactly the same internal value, NIL is returned otherwise.
(eq 'a 'a) ; returns T (eq 1 1) ; returns T (eq 1 1.0) ; returns NIL (eq 1.0 1.0) ; returns NIL (eq "a" "a") ; returns NIL (eq '(a b) '(a b)) ; returns NIL (eq 'a 34) ; returns NIL (setq a '(a b)) ; set value of A to (A B) (setq b a) ; set B to point to A's value (setq c '(a b)) ; set value of C to dif. (A B) (eq a b) ; returns T (eq a c) ; returns NIL
See the
eq
predicate function in the