Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/cljs/cljs/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
5 changes: 3 additions & 2 deletions src/main/clojure/cljs/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading