[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: Newbie: How do I exit from a loop when a condition is met?

William James

8/22/2015 9:42:00 PM

Edi Weitz wrote:

> (defun has-illegal-character (string)
> (loop for char across string
> when (is-illegal-character char)
> do (return t)))
>
> or
>
> (defun has-illegal-character (string)
> (loop for char across string
> thereis (is-illegal-character char)))

Gauche Scheme:

(use gauche.collection :only (find))

(find is-illegal-character "foo_bar")

--
In Stockholm ... 20 Muslim men ... began to assault the children, ripping their
swimsuits off.... [T]he men cornered one of the [11-year-old] girls in a
grotto in the bathhouse and gang-raped her. The police refused to press any
charges. www.liveleak.com/view?i=807_1369627137
Sahlin [stressed] that her compatriots must accept that the new Sweden is
multi-cultural.... "Like it or not, this is the new Sweden."
fjordman.blogspot.ca/2005/05/is-swedish-democracy-collapsing.html