[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Re: Apply-macro?

William James

5/13/2015 6:58:00 AM

Kent M. Pitman wrote:

> > (loop for val in lst
> > do
> > (if val (return t))))
>
> Actually, (loop for val in lst thereis val) is the OR thing,
> and (loop for val in lst always val) is the AND thing
> if you prefer to use loop.
>
> It even does the right thing with the OR'd return value in THEREIS,
> i.e., (loop for x in '(nil nil 3 4) thereis x) => 3

Gauche Scheme:

gosh> (find identity '(#f #f 3 4))
3

gosh> (every identity '(3 4))
4

--
Empires do not create nations. Empires corrupt, degenerate, and pervert
nations. All empires end their days ethnically hollow. The worst enemy of any
empire is its own citizens challenging the power of the imperial elite.
Therefore, a dying empire and its fearful elite is always willing to resort to
massive violence against the citizens of the empire in order to turn them into
slaves. www.kolumbus.fi/aquilon/america-middle-class-and-the-end-of-growth.htm