Re: (apply #'and '(t t nil)) not work
- From: pjb@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
- Date: Mon, 31 Mar 2008 16:01:02 +0200
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__
.
- Follow-Ups:
- Re: (apply #'and '(t t nil)) not work
- From: fishmacs
- Re: (apply #'and '(t t nil)) not work
- References:
- (apply #'and '(t t nil)) not work
- From: fishmacs
- (apply #'and '(t t nil)) not work
- Prev by Date: Re: (apply #'and '(t t nil)) not work
- Next by Date: Re: (apply #'and '(t t nil)) not work
- Previous by thread: Re: (apply #'and '(t t nil)) not work
- Next by thread: Re: (apply #'and '(t t nil)) not work
- Index(es):