Skip to content

Commit

Permalink
std/iter: allow interjection of filters after any binding in for*
Browse files Browse the repository at this point in the history
not just the last.
  • Loading branch information
vyzo committed Nov 11, 2019
1 parent dd7a8e0 commit 1e75922
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/std/iter.ss
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,12 @@
(generate-for #'(bind ...) #'(not expr) #'(body ...)))))

(defrules for* (when unless)
((_ (bind when expr) body ...)
((recur (bind when expr . rest) body ...)
(for-binding? #'bind)
(for (bind when expr) body ...))
((_ (bind unless expr) body ...)
(for (bind when expr) (recur rest body ...)))
((recur (bind unless expr . rest) body ...)
(for-binding? #'bind)
(for (bind unless expr) body ...))
(for (bind unless expr) (recur rest body ...)))
((recur (bind . rest) body ...)
(for-binding? #'bind)
(for (bind) (recur rest body ...)))
Expand Down

0 comments on commit 1e75922

Please sign in to comment.