 
 (defmacro aset [a i v]
   (list 'js* "(~{}[~{}] = ~{})" a i v))
+
+(defmacro +
+  ([] 0)
+  ([x] `x)
+  ([x y] (list 'js* "(~{} + ~{})" x y))
+  ([x y & more] `(+ (+ ~x ~y) ~@more)))
+
+(defmacro -
+  ([] 0)
+  ([x] `x)
+  ([x y] (list 'js* "(~{} - ~{})" x y))
+  ([x y & more] `(- (- ~x ~y) ~@more)))
+
+(defmacro *
+  ([] 1)
+  ([x] `x)
+  ([x y] (list 'js* "(~{} * ~{})" x y))
+  ([x y & more] `(* (* ~x ~y) ~@more)))
+
+(defmacro /
+  ([] 1)
+  ([x] `(/ 1 x))
+  ([x y] (list 'js* "(~{} / ~{})" x y))
+  ([x y & more] `(/ (/ ~x ~y) ~@more)))
+
+(defmacro <
+  ([x] true)
+  ([x y] (list 'js* "(~{} < ~{})" x y))
+  ([x y & more] `(< (< ~x ~y) ~@more)))
+
+(defmacro <=
+  ([x] true)
+  ([x y] (list 'js* "(~{} <= ~{})" x y))
+  ([x y & more] `(<= (<= ~x ~y) ~@more)))
+
+(defmacro >
+  ([x] true)
+  ([x y] (list 'js* "(~{} > ~{})" x y))
+  ([x y & more] `(> (> ~x ~y) ~@more)))
+
+(defmacro >=
+  ([x] true)
+  ([x y] (list 'js* "(~{} >= ~{})" x y))
+  ([x y & more] `(>= (>= ~x ~y) ~@more)))
+
+(defmacro ==
+  ([x] true)
+  ([x y] (list 'js* "(~{} === ~{})" x y))
+  ([x y & more] `(== (== ~x ~y) ~@more)))
+
+(defmacro dec
+  ([x] `(- x 1)))
+
+(defmacro inc
+  ([x] `(+ x 1)))
+
+(defmacro zero?
+  ([x] `(== x 0)))
+
+(defmacro pos?
+  ([x] `(> x 0)))
+
+(defmacro neg?
+  ([x] `(< x 0)))
+
+(defmacro rem
+  ([num div] (list 'js* "(~{} % ~{})" num div)))
 
 (defn- protocol-prefix [psym]
   (str (.replace (str psym) \. \$) "$"))

    (if (base-type tsym)
      (let [t (base-type tsym)
            assign-impls (fn [[psym sigs]]
                           (let [pfn-prefix (subs (str psym) 0 (inc (.lastIndexOf (str psym) ".")))]
                             (cons `(aset ~psym ~t true)
                                   (map (fn [[f & meths]]
                                          `(aset ~(symbol (str pfn-prefix f)) ~t (fn* ~@meths)))

                            with-loading-context with-local-vars with-open with-out-str with-precision with-redefs
                            satisfies?

                            aget aset + - * / <= >= == zero? pos? neg? inc dec rem]))

(alias 'core 'clojure.core)

