docs: def pre_scan(self, func=operator.add, seed=0):
          '''
          An exclusive prefix sum which returns the cumulative application of the
          supplied function up to but excluding the current element.
  
          Args:
               func: An optional binary function which is commutative - that is,
                   the order of the arguments is unimportant.  Defaults to a
                   summing operator.
  
               seed: The first element of the prefix sum and therefore also the
                   first element of the returned sequence.
  
          Returns:
              A Queryable such that the nth element is the sum of the first n-1
              elements of the source sequence.
  
          Raises:
              ValueError: If the Queryable has been closed.
              TypeError: If func is not callable.
          '''
          if self.closed():
              raise ValueError("Attempt to call pre_scan() on a "
                               "closed Queryable.")
  
          if not is_callable(func):
              raise TypeError("pre_scan() parameter func={0} is "
                              "not callable".format(repr(func)))
  
          return self._create(self._generate_pre_scan_result(func, seed))