A more concise version of
complement zeroBits.
>>> complement (zeroBits :: Word) == (oneBits :: Word)
True
>>> complement (oneBits :: Word) == (zeroBits :: Word)
True
Note
The constraint on
oneBits is arguably too strong. However, as
some types (such as
Natural) have undefined
complement, this is the only safe choice.