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