3 ms·
The problem is, that (equal 1 1) -> t (equal '(1 2) '(1 2)) -> t (eq 1 1) -> t (eq '(1 2) '(1 2)) -> nil because eq tests for the same symbol, while
by glogla 15y ago
The problem is, that
(equal 1 1) -> t
(equal '(1 2) '(1 2)) -> t
(eq 1 1) -> t
(eq '(1 2) '(1 2)) -> nil
because eq tests for the same symbol, while equal test for the same list. Member uses eq, not equal.
- wccrawford 15y agoAh, I see. Thanks.
- eadvgf 15y agoIf we are talking Common Lisp, the default test is actually EQL. ((eq 1 1) is not necessarily T).