def gray2bin(bits):
    """Converts a gray-encoded binary string into a binary string.
    
    Parameters
    ----------
    bits : list or tuple of bool
        The gray-encoded binary string as a list of True/False values.
    """
    b = [bits[0]]
    for nextb in bits[1:]:
        b.append(b[-1] ^ nextb)
    return b
