Subject: Re: is there a procedure "atom?" ?
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/03/01
Newsgroups: comp.lang.scheme
Message-ID: <7bdqrp$9p8nc@fido.engr.sgi.com>
Miki Tebeka  <mtebeka@iil.intel.com> wrote:
+---------------
| Hello Benny,
| > a number or a word(using number? and word?). I wonder if there are some
| > other cases I shall check for before confirming the argument is "atomic".
| 
|    (define (atom? obj) (not (pair? obj)))
| will do.
+---------------

That's certainly *exactly* the Common Lisp definition. But I'm
wondering if there aren't times when you might want this instead...

    (define (atom? obj) (not (or (pair? obj) (null? obj))))


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA