Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rutils.iter: fix defclause-sequence drivers #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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))))