We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a2be8b commit 29eb8e0Copy full SHA for 29eb8e0
src/main/clojure/cljs/core.cljc
@@ -2377,9 +2377,13 @@
2377
assoc :tag 'array)))
2378
2379
(core/defmacro list
2380
- ([] '(.-EMPTY cljs.core/List))
+ ([]
2381
+ '(.-EMPTY cljs.core/List))
2382
([x & xs]
- `(-conj (list ~@xs) ~x)))
2383
+ (if (= :constant (:op (cljs.analyzer/analyze &env x)))
2384
+ `(-conj (list ~@xs) ~x)
2385
+ `(let [x# ~x]
2386
+ (-conj (list ~@xs) x#)))))
2387
2388
(core/defmacro vector
2389
([] '(.-EMPTY cljs.core/PersistentVector))
0 commit comments