[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.lisp

Re: concentric loops

William James

8/15/2015 7:52:00 AM

Peter Seibel wrote:

> > --> ( 11 12 13 21 22 23 31 32 33)
> >
> > I know that in CL plus is replaced by +, but how can i
> > handle the mapcar inside the mapcan?
>
> (loop for x from 10 to 30 by 10 nconcing
> (loop for y from 1 to 3 collect (+ x y)))

Gauche Scheme:

(use srfi-42 :only (list-ec))

(list-ec (: x 10 31 10) (: y 1 4) (+ x y))
===>
(11 12 13 21 22 23 31 32 33)

--
As Helle "Hamas" Klein, political editor of Sweden's largest newspaper
Aftonbladet, boasts: "If the debate is going to be about whether there are
problems with immigrants, we don't want it". Welcome to Sweden, the country
where the media doesn't even pretend to champion freedom of speech, but openly
brags about censorship.
--- fjordman.blogspot.ca/2005/05/is-swedish-democracy-collapsing.html