Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
wccrawford
14y ago
0 comments
Save
Share
I can read just enough of that that it confuses me why it doesn't work. Care to explain?
0 comments
3 comments · 1 top-level
top
newest
oldest
glogla
14y ago
· 2 in thread
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.
eadvgf
14y ago
If we are talking Common Lisp, the default test is actually EQL. ((eq 1 1) is not necessarily T).
wccrawford
OP
14y ago
Ah, I see. Thanks.
j
/
k
navigate · click thread line to collapse