( 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)))
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))
[maprod + (range 10 31 10) 1..4](11 12 13 21 22 23 31 32 33)
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 40:46:08 |
| Calls: | 1,266 |
| Files: | 1,362 |
| D/L today: |
3 files (6,742K bytes) |
| Messages: | 285,445 |