b) Using a nested LOOP _may_ be indicative that you didn't use LOOP >properly, as you can put almost infinite complexity into a single
LOOP.
I suppose this is possible, but I don't think it's likely. Nested loops
are extremely common whenever you're traversing multi-dimensional
structures, e.g. a 2-d array with
(loop for i upto length
do
(loop for j upto width
do
(do-something-with (aref a i j))))
or a list of lists with:
(loop for inner in outer
do
(loop for item in inner
do
(do-something-with item)))
LOOP has quite a bit of complexity, but it doesn't actually have any way to do either of these easily in a single loop (well, in the first case you
could do it with ROW-MAJOR-AREF, but that's not really a LOOP feature,
that's a special array feature).
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 19:37:30 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
10 files (21,017K bytes) |
| Messages: | 194,291 |