Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit aae631e049da7235b690218bc63524cf1ec92294 2 parents 51e7fc8 + 17df970
Fogus fogus authored

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. +7 5 src/clj/cljs/core.clj
12 src/clj/cljs/core.clj
@@ -486,8 +486,9 @@
486 486 [true `(do ~@body)]
487 487 (let [k (first exprs)
488 488 v (second exprs)
  489 +
489 490 seqsym (when-not (keyword? k) (gensym))
490   - recform (if (keyword? k) recform `(recur (next ~seqsym)))
  491 + recform (if (keyword? k) recform `(recur (first ~seqsym) ~seqsym))
491 492 steppair (step recform (nnext exprs))
492 493 needrec (steppair 0)
493 494 subform (steppair 1)]
@@ -501,11 +502,12 @@
501 502 ~subform
502 503 ~@(when needrec [recform]))
503 504 ~recform)]
504   - :else [true `(loop [~seqsym (seq ~v)]
  505 + :else [true `(let [~seqsym (seq ~v)]
505 506 (when ~seqsym
506   - (let [~k (first ~seqsym)]
507   - ~subform
508   - ~@(when needrec [recform]))))]))))]
  507 + (loop [~k (first ~seqsym) ~seqsym ~seqsym]
  508 + ~subform
  509 + (when-let [~seqsym (next ~seqsym)]
  510 + ~@(when needrec [recform])))))]))))]
509 511 (nth (step nil (seq seq-exprs)) 1)))
510 512
511 513 (defmacro amap

0 comments on commit aae631e

Please sign in to comment.
Something went wrong with that request. Please try again.