From: Hubert =?ISO-8859-2?Q?Czobodzi=F1ski?=
Subject: conjuction of list elements
Date: 
Message-ID: <d485l5$fhp$1@news.onet.pl>
Hi,

I am quite newbie and I have to calculate conjunction (and alternative) of
all elements of list. Following seems to work:
(eval (cons 'and '(t t nil)))
but I'm not sure if it is "politically correct"... Any better methods?

Hubert
From: Tron3k
Subject: Re: conjuction of list elements
Date: 
Message-ID: <1114121607.243090.296520@l41g2000cwc.googlegroups.com>
Hi! There is indeed a better way to do that:

(eval (cons 'and '(t t nil))) is better replaced by:
(every #'identity '(t t nil))

and

(eval (cons 'or '(t t nil))) is better replaced by:
(some #'identity '(t t nil))

Check out this page in the hyperspec for more information:
http://www.lispworks.com/documentation/HyperSpec/Body/f_everyc.htm

--
Tron3k