Permalink
Browse files

* src/clj/cljs/core.clj: call -first and -rest directly in apply-to. …

…call seq on args.
  • Loading branch information...
1 parent eb74d02 commit a0bb601d0e75a7b9eee5317bd2f5553ee8e2946f David Nolen committed May 8, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/clj/cljs/core.clj
View
@@ -921,8 +921,8 @@
(let [prop (symbol (core/str "-cljs$lang$arity$" n))
f (symbol (core/str "cljs$lang$arity$" n))]
(if (core/<= n 20)
- `(let [~(cs (core/dec n)) (first ~'args)
- ~'args (rest ~'args)]
+ `(let [~(cs (core/dec n)) (-first ~'args)
+ ~'args (-rest ~'args)]
(if (core/== ~'argc ~n)
(if (. ~'f ~prop)
(. ~'f (~f ~@(take n cs)))
@@ -934,7 +934,8 @@
`(do
(set! ~'*unchecked-if* true)
(defn ~'apply-to [~'f ~'argc ~'args]
- (if (zero? ~'argc)
- (~'f)
- ~(gen-apply-to-helper)))
+ (let [~'args (seq ~'args)]
+ (if (zero? ~'argc)
+ (~'f)
+ ~(gen-apply-to-helper))))
(set! ~'*unchecked-if* false)))

0 comments on commit a0bb601

Please sign in to comment.