def _all(itr):
  """Similar to Python's all, but returns the first value that doesn't match."""
  any_iterations = False
  val = None
  for val in itr:
    any_iterations = True
    if not val:
      return val
  return val if any_iterations else True