Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!cambridge.apple.com!alms From: alms@cambridge.apple.com (Andrew L. M. Shalit) Newsgroups: comp.lang.scheme Subject: Re: (atom? '()) => #t Message-ID: Date: 8 Mar 90 15:33:08 GMT References: <1990Mar7.194937.1421@sun.soe.clarkson.edu> <7079@ubc-cs.UUCP> Sender: news@cambridge.apple.com Organization: Apple Computer Inc, Cambridge, MA Lines: 20 In-reply-to: manis@cs.ubc.ca's message of 8 Mar 90 03:20:13 GMT In article <7079@ubc-cs.UUCP> manis@cs.ubc.ca (Vincent Manis) writes: In article <1990Mar7.194937.1421@sun.soe.clarkson.edu> jk0@sun.soe.clarkson.edu (Jason Coughlin) writes: >Can someone explain the rationale behind treating '() as an atom? It >seems to me that it should be a pair: it's the empty *list* not the >empty *atom*. But remember, a list isn't a pair. It's zero or more pairs connected together via a cdr chain. In fact, a pair is an object to which the car and cdr procedures may be applied; it has been considered unkosher for many years to allow (car '()) and (cdr '()). Only unkosher in Scheme, not in Common Lisp. Perhaps more crucially, you have to be able to SET-CAR! and SET-CDR! a pair. This is something you certainly can't do to the empty list. -andrew