Determines whether two expressions are identical
(eq expr1 expr2)
eq function determines whether expr1 and expr2 are bound to the same object (by setq, for example).
TheArguments
The expression to be compared.
The expression to compare with expr1.
Return Values
T if the two expressions are identical; otherwise nil.
Examples
Given the following assignments:
(setq f1 '(a b c))
(setq f2 '(a b c))
(setq f3 f2)
f1 and f3:
CompareCommand: (eq f1 f3)
nil
eq returns nil because f1 and f3, while containing the same value, do not refer to the same list.
f3 and f2:
CompareCommand: (eq f3 f2)
T
eq returns T because f3 and f2 refer to the same list.
= (equal to) and equal functions.
The