下面是有关eq的定义 : Determines whether two expressions are identical (eq expr1 expr2) The eq function determines whether expr1 and expr2 are bound to the same object (by setq, for example). Examples Given the following assignments: (setq f1 '(a b c)) (setq f2 '(a b c)) (setq f3 f2) Compare f1 and f3: Command: (eq f1 f3)
nil eq returns nil because f1 and f3, while containing the same value, do not refer to the same list. Compare f3 and f2: Command: (eq f3 f2)
T eq returns T because f3 and f2 refer to the same list. |