Re:Interviews Can Be a Terrible Way to Identify Good Program...
by wccrawford on Sunday May 06, 2012 @06:44AM
(#3934766)
I can read just enough of that that it confuses me why it doesn't work. Care to explain?
Re:Interviews Can Be a Terrible Way to Identify Good Program...
by glogla on Sunday May 06, 2012 @07:11AM
(#3934809)
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.
Re:Interviews Can Be a Terrible Way to Identify Good Program...
by eadvgf on Sunday May 06, 2012 @04:19PM
(#3936186)
If we are talking Common Lisp, the default test is actually EQL. ((eq 1 1) is not necessarily T).
Re:Interviews Can Be a Terrible Way to Identify Good Program...
by wccrawford on Sunday May 06, 2012 @08:54AM
(#3934993)
Ah, I see. Thanks.
I seem to remember the
bug. It took me just three hours, but boy was it annoying. In the end, it was just me not knowing the language of course.