def make_oracle_f(c):
  """Return a function computing the dot product mod 2 of bits, c."""

  const_c = c
  def f(*bit_string):
    val = 0
    for idx in range(len(*bit_string)):
      val += const_c[idx] * bit_string[0][idx]
    return val % 2
  return f