[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]

    Date: 18 DEC 1978 2056-EST
    From: BAK at MIT-MC (William A. Kornfeld)

    In general, when you evaluate (memq <atom> <atom>) you get nil.  However
    evaluating (memq 4 2) seems to cause an infinite loop!
Right!!  This is the canonical "Use NIL check, not atom check for end of lists".
What happens is that normally it ends up doing CDR's to randomness and
since 0 is so common eventually gets NIL.  BUT, probably AC 2 contains a value
that MEMQ sets up, and so it CDR's back to 2, which might point to itself, etc...

Basically, don't pass it atoms!