Fortunately, if you want that sort of thing in Lisp there's always the iterate library: https://common-lisp.net/project/iterate/
It looks pretty good to me, and I hear good things about it, although frankly I've always just used LOOP.
It looks pretty good to me, and I hear good things about it, although frankly I've always just used LOOP.
0: http://www.lispworks.com/documentation/HyperSpec/Body/m_doti...
1: http://www.lispworks.com/documentation/HyperSpec/Body/m_doli...
2: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node348.html#S...
A matter of preference of course. The benefits of for loops or named lets is that they are functional and thus continuation safe. I did a bunch of continuation-based nondeterminism things last year, and knowing things weren't mutating was nice.