Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn bit-count [v]
- (loop [v v
- c 0]
- (if (zero? v)
- c
- (recur (bit-and v (dec v)) (inc c)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement