LOOP is powerful, general, and standard. E.g.
CL-USER 5 > (loop as i below 5 collect i collect (* i 2))
(0 0 1 2 2 4 3 6 4 8)
Software Scavenger wrote:
LOOP is powerful, general, and standard. E.g.
CL-USER 5 > (loop as i below 5 collect i collect (* i 2))
(0 0 1 2 2 4 3 6 4 8)
Gauche Scheme
(use srfi-42) ; append-ec
(append-ec (: i 5) (list i (* i 2)))
(0 0 1 2 2 4 3 6 4 8)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (3 / 13) |
Uptime: | 19:24:12 |
Calls: | 10,390 |
Calls today: | 1 |
Files: | 14,061 |
Messages: | 6,416,962 |