Re: (apply #'and '(t t nil)) not work



fishmacs <wzhao1984@xxxxxxxxx> writes:

Apparently and is not a normal function like +, -, ...
I can write (and t t nil), but if the parameters are packaged into a list,
how can I do?

Indeed, AND and OR are macros, not functions. This allows to shortcut:

(and nil (drop-the-bomb)) ; won't drop it.
(or t (shoot-in-your-foot)) ; won't hurt you either.


You can use the functions EVERY and SOME instead:

(every (function identity) list-of-bools)
(some (function identity) list-of-bools)
(every (function not) list-of-bools)
(some (function not) list-of-bools)

--
__Pascal Bourguignon__
.