home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / emacs / help / 3536 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.2 KB

  1. Path: sparky!uunet!olivea!hal.com!decwrl!bu.edu!nntp-read!jbw
  2. From: jbw@bigbird.bu.edu (Joe Wells)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: 2 Elisp questions
  5. Message-ID: <JBW.92Jul28194339@bigbird.bu.edu>
  6. Date: 29 Jul 92 00:43:38 GMT
  7. References: <8eRCDdO00VpA4D6Rgt@andrew.cmu.edu>
  8.  <1992Jul28.230747.865@CSD-NewsHost.Stanford.EDU>
  9. Sender: news@bu.edu
  10. Organization: Boston University Computer Science Department
  11. Lines: 16
  12. In-reply-to: crew@CS.Stanford.EDU's message of 28 Jul 92 23:07:47 GMT
  13.  
  14. In article <1992Jul28.230747.865@CSD-NewsHost.Stanford.EDU> crew@CS.Stanford.EDU (Roger Crew) writes:
  15.  
  16.    In article <8eRCDdO00VpA4D6Rgt@andrew.cmu.edu> jf41+@andrew.cmu.edu (Jonathan R. Ferro) writes:
  17.    > 2. Is there REALLY no built-in function that you can apply to a list of
  18.    >    t's and nil's to get their collective AND or OR?  I eventually broke
  19.    >    down and wrote my own, but this is surprising.
  20.  
  21.    (apply 'and lst) == (not (memq nil lst))
  22.    (apply 'or  lst) == (memq t lst)
  23.  
  24. What about other true values than t?  If it's okay to destroy the list,
  25. you can use (delq nil lst) instead.
  26.  
  27. -- 
  28. Joe Wells <jbw@cs.bu.edu>
  29. Member of the League for Programming Freedom --- send e-mail for details
  30.