Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

inline (make-array size)

  • Loading branch information...
commit 6c43641206273dba866787f25fdb5b58c8ffa744 1 parent 1cc6b7a
@swannodette swannodette authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/clj/cljs/core.clj
View
5 src/clj/cljs/core.clj
@@ -16,6 +16,7 @@
when when-first when-let when-not while with-bindings with-in-str
with-loading-context with-local-vars with-open with-out-str with-precision with-redefs
satisfies? identical? true? false? number? nil? instance? symbol? str get
+ make-array
aget aset
+ - * / < <= > >= == zero? pos? neg? inc dec max min mod
@@ -1150,6 +1151,10 @@
(list 'js* (core/str "[" xs-str "]"))
rest)))
+(defmacro make-array
+ [size]
+ `(js/Array. ~size))
+
(defmacro js-obj [& rest]
(let [kvs-str (->> (repeat "~{}:~{}")
(take (quot (count rest) 2))
Please sign in to comment.
Something went wrong with that request. Please try again.