bit-or

function/macrosince v0.0-927 clojure.core/bit-orEdit
(bit-or x y)
(bit-or x y & more)

Details:

Bitwise "or". Same as x | y in JavaScript.


Examples:

Bits can be entered using radix notation:

(bit-or 2r1100 2r1010)
;;=> 14
;; 14 = 2r1110

Same numbers in decimal:

(bit-or 12 10)
;;=> 14

See Also:


Source docstring:
Bitwise or
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn bit-or
  ([x y] (cljs.core/bit-or x y))
  ([x y & more]
     (reduce bit-or (cljs.core/bit-or x y) more)))

Macro code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro ^::ana/numeric bit-or
  ([x y] (core/list 'js* "(~{} | ~{})" x y))
  ([x y & more] `(bit-or (bit-or ~x ~y) ~@more)))