Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:clojure/clojurescript

  • Loading branch information...
commit aae631e049da7235b690218bc63524cf1ec92294 2 parents 51e7fc8 + 17df970
@fogus fogus authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/clj/cljs/core.clj
View
12 src/clj/cljs/core.clj
@@ -486,8 +486,9 @@
[true `(do ~@body)]
(let [k (first exprs)
v (second exprs)
+
seqsym (when-not (keyword? k) (gensym))
- recform (if (keyword? k) recform `(recur (next ~seqsym)))
+ recform (if (keyword? k) recform `(recur (first ~seqsym) ~seqsym))
steppair (step recform (nnext exprs))
needrec (steppair 0)
subform (steppair 1)]
@@ -501,11 +502,12 @@
~subform
~@(when needrec [recform]))
~recform)]
- :else [true `(loop [~seqsym (seq ~v)]
+ :else [true `(let [~seqsym (seq ~v)]
(when ~seqsym
- (let [~k (first ~seqsym)]
- ~subform
- ~@(when needrec [recform]))))]))))]
+ (loop [~k (first ~seqsym) ~seqsym ~seqsym]
+ ~subform
+ (when-let [~seqsym (next ~seqsym)]
+ ~@(when needrec [recform])))))]))))]
(nth (step nil (seq seq-exprs)) 1)))
(defmacro amap
Please sign in to comment.
Something went wrong with that request. Please try again.