JuliaLang/julia — comment on commit 4c86f1b3e228a45321318d4b718052a20ff1929e
File:  line 0
By JeffBezanson:

These can be defined generically, e.g.

count_zeros(x::Integer) = count_ones(~x)