[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: Draconian function

William James

7/20/2015 9:02:00 AM

> > Which means you can use LOOP:
> >
> > (defun count-constraints-involvement (val list)
> > (loop for row in *rows*
> > when (and (find val row) (some (lambda (y) (find y row)) list)))
> > sum 1))
>
> Or even:
>
> (loop for row in *rows*
> count (and (find val row)
> (some (lambda (y) (find y row)) list)))

Gauche Scheme:

(count
(lambda (row)
(and (member val row)
(any (cut member <> row) list)))
rows)

--
Africans gang-rape and clitorectomize Finnish girl; government arrests Finn
whom they accuse of complaining:
conservative-headlines.com/2009/03/another-european-awaits-extradition-for-hate-speech