Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!ccvax.ucd.ie!eweb From: eweb@ccvax.ucd.ie Newsgroups: comp.lang.lisp Subject: Re: Problem with (apply #'or )? (cl 3.0.1) Message-ID: <47946.27c2d8d3@ccvax.ucd.ie> Date: 20 Feb 91 20:15:15 GMT References: <1991Feb15.065508.28609@cs.columbia.edu> Organization: University College Dublin Lines: 28 In article <1991Feb15.065508.28609@cs.columbia.edu>, (David Yang) writes: > Maybe I'm missing something, but I don't see why (apply #'or '(t nil t nil)) > shouldn't work. What am I missing? > I agree that it seems odd that special forms can't be APPLYed or FUNCALLed, however in your particular example, what you are missing are the functions EVERY, SOME, NOTANY and NOTEVERY, (CLtL, 1st Ed, page 250). (apply #'or list-of-values) == (some list-of-values) (apply #'and list-of-values) == (every list-of-values) As for the reason why special forms cannot be FUNCALLed or APPLYe, I reckon it has to do with the fact that it is unknown which (if any) args are to be evaluated or not. If SOME or EVERY won't do the job, you could use (eval (cons 'or list-of-values)).... Eamonn Webster eweb@ccvax.ucd.ie Department of Computer Science eweb@ccvax.bitnet University College Dublin Belfield Dublin 4 Ireland Phone +353-1-693244 ext 2484 Fax: +353-1-697262