hey,
in the elisp implementation of loop I can do this:
(setq vec (vector 1 2 5 6))
(loop for elem being the elements of vec
...)
and so "being the elements" works for sequences. I loved that, the
same way I like to use `elt' when I don't feel like remembering what
data structure I used. How do I do that with the CL version of loop?
(specifically in Allegro CL)
thanks,
dave
In article <···············@engc.bu.edu>, David Bakhash <·····@bu.edu> wrote:
> hey,
>
> in the elisp implementation of loop I can do this:
>
> (setq vec (vector 1 2 5 6))
>
> (loop for elem being the elements of vec
> ...)
>
> and so "being the elements" works for sequences. I loved that, the
> same way I like to use `elt' when I don't feel like remembering what
> data structure I used. How do I do that with the CL version of loop?
> (specifically in Allegro CL)
>
> thanks,
> dave
For vectors use:
(loop for item across (vector 1 2 3)
collect item)
A sequence version? Doesn't exist, I think.