3 ms·
Technically not, because a cons of two objects is not eq to another cons of the same two objects. (eq (cons 1 2) (cons 1 2)) ;; => nil It's memory l
by tmtvl 4y ago
Technically not, because a cons of two objects is not eq to another cons of the same two objects.
(eq (cons 1 2)
(cons 1 2))
;; => nil
It's memory locations, after all.
- Chinjut 4y agoI see, fair enough. I forgot to switch out of pure functional programming/referential transparency mode for this discussion. Fine, you can take NIL to be one particular (NIL . NIL) that's different from all other (NIL . NIL)s, the only particular (NIL . NIL) that is considered a list of length 0 while all other (NIL . NIL)s are lists of length 1.