code: func Flatten(agg Aggregate) Aggregate {
  	result := []error{}
  	if agg == nil {
  		return nil
  	}
  	for _, err := range agg.Errors() {
  		if a, ok := err.(Aggregate); ok {
  			r := Flatten(a)
  			if r != nil {
  				result = append(result, r.Errors()...)
  			}
  		} else {
  			if err != nil {
  				result = append(result, err)
  			}
  		}
  	}
  	return NewAggregate(result)
  }
docs: // Flatten takes an Aggregate, which may hold other Aggregates in arbitrary
  // nesting, and flattens them all into a single Aggregate, recursively.