If you want to have some fun, why not write a nice higher-order function
to do:
(defun silly-loop (string &optional (increment 1) (final-char nil))
(loop for n from 0 by increment
for char across string
until (eql char final-char)
collect char into char-bag
sum n into sum
finally (return (values char-bag sum n))))
Try to make it half as readable. And as efficient.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 19:39:17 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
10 files (21,017K bytes) |
| Messages: | 194,291 |