3 ms·
(car nil) -> nil doesn't seem obvious to me. It implies that (equal nil (cons nil nil)) i.e. (equal nil '(nil)). Now I'm not a very experienced lisp programmer
by kahrkunne 10y ago
(car nil) -> nil doesn't seem obvious to me. It implies that (equal nil (cons nil nil)) i.e. (equal nil '(nil)).
Now I'm not a very experienced lisp programmer, but I don't see why those two would be equivalent. FWIW, at least on SBCL, (car nil) does evaluate to nil.
- kruhft 10y agoUnlike NULL (a void* of value 0), nil is an interesting construct in that it's a special cons cell, an element of two pointers, where each cell points to itself. Or that's one way to think of it.