Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CLJS-366: revert CLJS-39, broke :when and change no longer necessary …

…now that we track let expressions in loops.
  • Loading branch information...
commit b73c51a75c58d00e6cbe9c16d94852af8e642880 1 parent 1fd703f
David Nolen authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/clj/cljs/core.clj
11 src/clj/cljs/core.clj
@@ -944,7 +944,7 @@
v (second exprs)
seqsym (when-not (keyword? k) (gensym))
- recform (if (keyword? k) recform `(recur (first ~seqsym) ~seqsym))
+ recform (if (keyword? k) recform `(recur (next ~seqsym)))
steppair (step recform (nnext exprs))
needrec (steppair 0)
subform (steppair 1)]
@@ -958,12 +958,11 @@
~@(when needrec [recform]))
- :else [true `(let [~seqsym (seq ~v)]
+ :else [true `(loop [~seqsym (seq ~v)]
(when ~seqsym
- (loop [~k (first ~seqsym) ~seqsym ~seqsym]
- ~subform
- (when-let [~seqsym (next ~seqsym)]
- ~@(when needrec [recform])))))]))))]
+ (let [~k (first ~seqsym)]
+ ~subform
+ ~@(when needrec [recform]))))]))))]
(nth (step nil (seq seq-exprs)) 1)))
(defmacro array [& rest]
Please sign in to comment.
Something went wrong with that request. Please try again.