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: | 54 |
| Nodes: | 6 (1 / 5) |
| Uptime: | 23:41:26 |
| Calls: | 742 |
| Files: | 1,218 |
| D/L today: |
6 files (8,794K bytes) |
| Messages: | 186,855 |
| Posted today: | 1 |