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

Official Documentation

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

Docstring
==================================================
  Flip bit at index n

Source

(defn bit-flip
  "Flip bit at index n"
  {:added "1.0"
   :static true}
  [x n] (. clojure.lang.Numbers flipBit x n))

Example 1

Edit
(bit-flip 2r1011 2)
;; => 15 
;; 15 = 2r1111

(bit-flip 2r1111 2)
;; => 11 
;; 11 = 2r1011

Uses on crossclj