user=> (Integer/toBinaryString 235) "11101011" user=> (Integer/toBinaryString 199) "11000111" user=> (bit-and 235 199) 195 user=> (Integer/toBinaryString 195) "11000011" ;;11101011 ;;& ;;11000111 ;;= ;;11000011
(defn bit-and
"Bitwise and"
{:inline (nary-inline 'and)
:inline-arities >1?
:added "1.0"}
([x y] (. clojure.lang.Numbers and x y))
([x y & more]
(reduce1 bit-and (bit-and x y) more)))
Comments top
No comments for bit-and. Log in to add a comment.