testBit -package:protolude
x `testBit` i is the same as
x .&. bit n /= 0
In other words it returns True if the bit at offset @n is set.
Can be implemented using
testBitDefault if
a is also
an instance of
Num.
x `testBit` i is the same as
x .&. bit n /= 0
In other words it returns True if the bit at offset @n is set.
Can be implemented using
testBitDefault if
a is also
an instance of
Num.
Return Just if every bitvector in the domain has the same bit
at the given index.
Default implementation for
testBit.
Note that:
testBitDefault x i = (x .&. bit i) /= 0
Like
testBit, but takes a
Natural for the bit index. If
the index is out of bounds, return
False.
Returns true if the corresponding bit in the bitvector is set.