store/[org.clojure/clojure "1.8.0"] clj::clojure.core/bit-set

Official Documentation

Add notes
Arities
==================================================
   [x n]

Docstring
==================================================
  Set bit at index n

Source

(defn bit-set
  "Set bit at index n"
  {:added "1.0"
   :static true}
  [x n] (. clojure.lang.Numbers setBit x n))

Example 1

Edit
(bit-set 2r1011 2) ; index is 0-based
;; => 15 

;; 15 = 2r1111


;; the same in decimal
(bit-set 11 2) 
;; => 15 

Uses on crossclj