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

  1.     Sorry to anyone who's getting this twice: I can't figure out from
  2. the mailer error message who got it and who didn't...
  3.  
  4.  
  5.     The predicate atom in Franz appears to be:
  6.     
  7. (defun atom(foo)
  8.    (if foo
  9.       then (not (or (hunkp foo) (dtpr foo)))
  10.       else t))
  11.  
  12. whereas a more natural implementation, it seems to me, is:
  13.  
  14. (defun atom(foo)
  15.    (or (symbolp foo) (numberp foo)))
  16.  
  17. Since it seems to me that:
  18.  
  19. (xor (vectorp foo) (hunkp foo) (dtpr foo) (atom foo) (arrayp foo))
  20.  
  21. should always be non-nil for non-nil objects.  Or, better put, that vectors,
  22. hunks, dtprs, atoms, and arrays should partition the data space.  No?
  23.  
  24.                     Rick.
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.