[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: loop ... until ... and then return this

William James

10/6/2015 5:17:00 AM

> The extended loop macro does this sort of thing out of the box.
>
> (loop for string in '("foo" "123" "bar" "456")
> when (parse-integer string :junk-allowed t)
> collect it)
> => (123 456)

Gauche Scheme:

gosh> (filter-map string->number '("foo" "123" "bar" "456"))
(123 456)

--
[H]e was prosecuted ... for "denying" the gas chambers and the six million
figure. In July 1998 a Swiss court sentenced him to 15 months imprisonment,
and to pay a large fine, because of his writings. Rather than serve the
sentence, in August 2000 Graf went into exile. In 2001 he married a Russian
historian in Moscow. www.revisionists.com/revisionists/graf.html
2 Answers

RamRod Sword of Baal

6/10/2011 2:00:00 AM

0



"IlBeBauck@gmail.com" wrote in message
news:38b038ff-0448-46a1-bb36-1cfe9caa0755@q14g2000prh.googlegroups.com...

> Making love with one anothers feces

I think you have humans confused with chickens.................


They rub their cloacas together.

William James

11/1/2015 12:03:00 AM

0

WJ wrote:

> > The extended loop macro does this sort of thing out of the box.
> >
> > (loop for string in '("foo" "123" "bar" "456")
> > when (parse-integer string :junk-allowed t)
> > collect it)
> > => (123 456)
>
> Gauche Scheme:
>
> gosh> (filter-map string->number '("foo" "123" "bar" "456"))
> (123 456)

MatzLisp (Ruby):

["foo", "123", "bar", "456"].flat_map{|x| [Integer(x)] rescue []}
==>[123, 456]

--
Viewed at its most abstract level, a fundamental agenda is thus to influence
the European-derived peoples of the United States to view concern about their
own demographic and cultural eclipse as irrational and as an indication of
psychopathology. --- Dr. Kevin MacDonald; "The Frankfurt School of Social
Research and the Pathologization of Gentile Group Allegiances"