Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/iter.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ the body of the loop, so it must not contain anything that depends on the body."
(seq-code (or seq-var sequence))
(step-var (unless (constant? by)
(make-var-and-default-binding 'step :type 'fixnum)))
(step (or step-var by))
(step (or step-var by 1))
(step-func (if (or downto downfrom above) '- '+))
(test-func (cond (to '>)
((or downto downfrom) '<)
Expand Down
4 changes: 4 additions & 0 deletions test/iter-test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
(cl:in-package #:rutils.test)
(named-readtables:in-readtable rutils-readtable)

(deftest iter ()
(should be equal '(#\a #\b #\c)
(iter (:for c :in-string "abc")
(:collect c))))