code: func (s *set) Reduce(i *Term, f func(*Term, *Term) (*Term, error)) (*Term, error) {
  	err := s.Iter(func(x *Term) error {
  		var err error
  		i, err = f(i, x)
  		if err != nil {
  			return err
  		}
  		return nil
  	})
  	return i, err
  }
docs: // Reduce returns a Term produced by applying f to each value in s. The first
  // argument to f is the reduced value (starting with i) and the second argument
  // to f is the element in s.