Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cs.columbia.edu!d-yang From: d-yang@cs.columbia.edu (David Yang) Newsgroups: comp.lang.lisp Subject: Re: Problem with (apply #'or )? (cl 3.0.1) Message-ID: <1991Feb15.192603.12714@cs.columbia.edu> Date: 15 Feb 91 19:26:03 GMT References: <1991Feb15.065508.28609@cs.columbia.edu> Reply-To: d-yang@cs.columbia.edu (David Yang) Followup-To: comp.lang.lisp Organization: Columbia University Department of Computer Science Lines: 36 Thanks for all the helpful and patient answers; here's one with an alternative. David From: Andrew Philpot ; ; As someone has no doubt already told you (but hey what's another ; redundant message): ; ; OR is usually a macro, (or I think sometimes a special form) and thus ; cannot be applied. ; ; If you want to map across a list of (assumed) boolean values, ; returning the first one which is not NIL, or NIL if they all are NIL, ; try: ; ; (some #'identity ) ; ; for example ; ; > (some #'identity '(t nil t nil)) ; T ; ; > (some #'identity '(nil nil () 5 t nil)) ; 5 ; ; > (some #'identity '(nil nil nil nil)) ; NIL ; ; etc. ; ; Also see EVERY, NOTANY, NOTEVERY. ; ; << Andrew >> ;