diff --git a/src/main/cljs/cljs/core.cljs b/src/main/cljs/cljs/core.cljs index ad87e9505..40944f0c8 100644 --- a/src/main/cljs/cljs/core.cljs +++ b/src/main/cljs/cljs/core.cljs @@ -2932,22 +2932,22 @@ reduces them without incurring seq initialization" (Math/ceil q))) (defn int - "Coerce to int by stripping decimal places." + "Coerce to int." [x] (bit-or x 0)) (defn unchecked-int - "Coerce to int by stripping decimal places." + "Coerce to int." [x] (fix x)) (defn long - "Coerce to long by stripping decimal places. Identical to `int'." + "Coerce to long. Identical to `int'." [x] (fix x)) (defn unchecked-long - "Coerce to long by stripping decimal places. Identical to `int'." + "Coerce to long. Identical to `int'." [x] (fix x)) diff --git a/src/main/clojure/cljs/core.cljc b/src/main/clojure/cljs/core.cljc index f6cfb7a1e..adde92ad0 100644 --- a/src/main/clojure/cljs/core.cljc +++ b/src/main/clojure/cljs/core.cljc @@ -1236,8 +1236,9 @@ ([x y] (core/list 'js* "(~{} | ~{})" x y)) ([x y & more] `(bit-or (bit-or ~x ~y) ~@more))) -(core/defmacro ^::ana/numeric int [x] - `(bit-or ~x 0)) +(core/defmacro int + [x] + (core/list 'js* "(~{} | 0)" x)) (core/defmacro ^::ana/numeric bit-xor ([x y] (core/list 'js* "(~{} ^ ~{})" x y))