home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / lisp / lispnews / text0237.txt < prev    next >
Encoding:
Text File  |  1985-11-10  |  508 b   |  24 lines

  1.     The predicate atom in Franz appears to be:
  2.     
  3. (defun atom(foo)
  4.    (if foo
  5.       then (not (or (hunkp foo) (dtpr foo)))
  6.       else t))
  7.  
  8. whereas a more natural implementation, it seems to me, is:
  9.  
  10. (defun atom(foo)
  11.    (or (symbolp foo) (numberp foo)))
  12.  
  13. Since it seems to me that:
  14.  
  15. (xor (vectorp foo) (hunkp foo) (dtpr foo) (atom foo) (arrayp foo))
  16.  
  17. should always be non-nil for non-nil objects.  Or, better put, that vectors,
  18. hunks, dtprs, atoms, and arrays should partition the data space.  No?
  19.  
  20.                     Rick.
  21.  
  22.  
  23.  
  24.