Re: (apply #'and '(t t nil)) not work
- From: fishmacs <wzhao1984@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 22:53:43 +0800
"Alex Mizrahi" <udodenko@xxxxxxxxxxxxxxxxxxxxx> writes:
of course you can define your own function -- to get rid of #'indetityThanks all responses. But I do need short-circuit evalution.
parameter, or allowing it to agruments directly. i.e.
(defun my-and (&rest args) (every #'identity args))
CL-USER> (my-and t t nil)
NIL
CL-USER> (apply #'my-and '(t t nil))
NIL
this looks just like AND, but it does not short-circuit evaluation.
I wrote a macro(very silly):
(defmacro andl (lst)
`(and ,@lst))
if type (andl '(1)) in the REPL, I get the error:
EVAL: variable QUOTE has no value
.
- Follow-Ups:
- Re: (apply #'and '(t t nil)) not work
- From: Pascal J. Bourguignon
- Re: (apply #'and '(t t nil)) not work
- From: Alex Mizrahi
- Re: (apply #'and '(t t nil)) not work
- From: Brian
- Re: (apply #'and '(t t nil)) not work
- References:
- (apply #'and '(t t nil)) not work
- From: fishmacs
- Re: (apply #'and '(t t nil)) not work
- From: Alex Mizrahi
- (apply #'and '(t t nil)) not work
- Prev by Date: Re: what is up with the spam?
- 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):
Relevant Pages
|
|