Deutsch English Français Italiano |
<vbtreg$33ap$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "B. Pym" <Nobody447095@here-nor-there.org> Newsgroups: comp.lang.lisp,comp.lang.scheme Subject: Re: concentric loops Date: Thu, 12 Sep 2024 04:41:56 -0000 (UTC) Organization: A noiseless patient Spider Lines: 22 Message-ID: <vbtreg$33ap$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Injection-Date: Thu, 12 Sep 2024 06:41:57 +0200 (CEST) Injection-Info: dont-email.me; posting-host="15295cbec5a95e756a39a07bb6746ed8"; logging-data="101721"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190RxkEUZ5NYceJ1oF0i0HB" User-Agent: XanaNews/1.18.1.6 Cancel-Lock: sha1:cGc7kc3KGAL9WzehjR7aCgtIMFk= Bytes: 1345 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) ; list-ec (list-ec (:range x 10 31 10) (:range y 1 4) (+ x y)) ===> (11 12 13 21 22 23 31 32 33) Shorter: (list-ec (: x 10 31 10) (: y 1 4) (+ x y))