bitsDiff' :: FiniteBits a => a -> Int -> Int -> [Bool] -> [Bool]
bitsDiff' a n len bs
  | n < len   = testBit a n : bitsDiff' a (n + 1) len bs
  | n == len  = bs
  | otherwise = error "Invalid index"
bitsDiff' :: FiniteBits a => a -> Int -> Int -> [Bool] -> [Bool]
bitsDiff' a n len bs
  | n < len   = testBit a n : bitsDiff' a (n + 1) len bs
  | n == len  = bs
  | otherwise = error "Invalid index"
bitsDiff' a n len bs
  | n < len   = testBit a n : bitsDiff' a (n + 1) len bs
  | n == len  = bs
  | otherwise = error "Invalid index"