code: private Iterator<Tuple> getBinds( Iterator<Tuple> tuples, final VarDef var)
      {
      return
        IteratorUtils.filteredIterator(
          tuples,
          tuple -> tuple.getBinding( var) != null);
      }
docs: Returns input tuples that bind the given variable.