Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!image.soe.clarkson.edu!jk0 From: jk0@sun.soe.clarkson.edu (Jason Coughlin) Newsgroups: comp.lang.scheme Subject: (atom? '()) => #t Message-ID: <1990Mar7.194937.1421@sun.soe.clarkson.edu> Date: 7 Mar 90 19:49:37 GMT Organization: Clarkson University, Potsdam, NY Lines: 47 This one just burnt me, *badly*. 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*. Given this defn of a cons node: struct C_node { struct CONS_NODE *car; struct CONS_NODE *cdr; } ; struct CONS_NODE { int type; union { struct C_node cdata; int idata; double fdata; ...etc.. } data; } ; #define CC 1 /* car is a PAIR, cdr is a pair */ #define CA 2 /* car is a PAIR, cdr is an atom */ #define AC 3 /* car is an ATOM, cdr is PAIR */ #define AA 4 /* car is an ATOM, cdr is an ATOM */ #define INT 5 #define FLOAT 6 ...etc... (note: the C means CONS, probably should be a P for PAIR) seem to me, that the list (a b c) should be this: AC -> AC -> AC -> NIL a b c but since '() is an atom, it is in actuality this: AC -> AC -> A A a b c NIL -- Jason Coughlin ( jk0@sun.soe.clarkson.edu , jk0@clutx ) "Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of." - They Might Be Giants