function/macro | since v0.0-927 | clojure.core/bit-or | Edit |
(bit-or x y)
(bit-or x y & more)
Bitwise "or". Same as x | y
in JavaScript.
Bits can be entered using radix notation:
(bit-or 2r1100 2r1010)
;;=> 14
;; 14 = 2r1110
Same numbers in decimal:
(bit-or 12 10)
;;=> 14
Bitwise or
(defn bit-or
([x y] (cljs.core/bit-or x y))
([x y & more]
(reduce bit-or (cljs.core/bit-or x y) more)))
(core/defmacro ^::ana/numeric bit-or
([x y] (core/list 'js* "(~{} | ~{})" x y))
([x y & more] `(bit-or (bit-or ~x ~y) ~@more)))