1.3.0 permalink Arrow_down_16x16

bit-test

clojure.core

  • (bit-test x n)
Test bit at index n

1 Example top

  • user=> (bit-test 2r1001 0)
    true 
    
    user=> (bit-test 2r1001 1)
    false 
    
    user=> (bit-test 2r1001 7)
    false
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1284 top

(defn bit-test
  "Test bit at index n"
  {:added "1.0"
   :static true}
  [x n] (. clojure.lang.Numbers testBit x n))
Vars in clojure.core/bit-test:
Used in 0 other vars

Comments top

No comments for bit-test. Log in to add a comment.