Extend LOOP BEING THE ELEMENTS OF extension
Bug #1850277 reported by
Michał "phoe" Herda
on 2019-10-29
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SBCL |
Wishlist
|
Unassigned |
Bug Description
http://
;; Print the characters in a string, which is also a vector.
> (loop for x being the elements of "abcde" from 2
do (print x))
#\c
#\d
#\e
NIL
This example currently fails on SBCL due to `FROM 2` not being expected in this LOOP context.
Douglas Katzman (dougk) wrote : | #1 |
Stas Boukarev (stassats) wrote : | #2 |
there's no portable way of iterating on sequences.
Stas Boukarev (stassats)
on 2020-05-02
Changed in sbcl: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
A loop extension would make sense only when there is no portable way to iterate on a thing.
This loop has a portable equivalent of:
(loop with v = "abcde" for i from 2 below (length v)
for x = (aref v i) do (print x))
Quicklisp has a bunch of extensible iteration macros to choose from.