code: func (iter *referenceFilteredIter) ForEach(cb func(*plumbing.Reference) error) error {
  	defer iter.Close()
  	for {
  		r, err := iter.Next()
  		if err == io.EOF {
  			break
  		}
  		if err != nil {
  			return err
  		}
  
  		if err := cb(r); err != nil {
  			if err == ErrStop {
  				break
  			}
  
  			return err
  		}
  	}
  
  	return nil
  }
docs: // ForEach call the cb function for each reference contained on this iter until
  // an error happens or the end of the iter is reached. If ErrStop is sent
  // the iteration is stopped but no error is returned. The iterator is closed.