David Trudgett <dtrudgett@yahoo.com> wrote:
+---------------
| But in CL we don't use recursive procedure definitions to do
| iteration. We use iterative constructs instead:
| (LOOP FOR ITEM IN '(SOME SORT OF LIST) COLLECT ITEM)
| => (SOME SORT OF LIST)
| Of course, this solution doesn't look nearly as impressive and also
| neglects to reverse the order of the items in the list...
+---------------
And even if one were resisting LOOP for sme odd reason,
there are still plenty of other ways to do it in CL, e.g.:
> (let (accum)
(dolist (i '(some sort of list) accum)
(push i accum)))
(LIST OF SORT SOME)
>
Of course, for that *particular* semantics you'd be better
of with simply:
> (reverse '(some sort of list))
(LIST OF SORT SOME)
>
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607