Open sjakobi opened 2 years ago
I'm becoming less convinced that introducing anyMatch b1 b2 = b1 .&. b2 /= 0
would be a good idea. It would probably involve re-ordering branches, e.g. where currently b .&. m == 0
comes first.
I also suspect that the pattern is sufficiently simple that additional documentation isn't too important.
clearLowestSetBit x = x .&. (x - 1)
might be a useful addition.
The main advantage of having proper functions for these code patterns is that the functions can have proper documentation.
incrementShift s = s + bitsPerSubkey
(Done in #432)anyMatch b1 b2 = b1 .&. b2 /= 0
isolateLowestSetBit x = x .&. negate x
(#424)