Extend LOOP BEING THE ELEMENTS OF extension
Bug #1850277 reported by
Michał "phoe" Herda
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
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.
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.