code: func Extend(orig *Set, id identity.Identity) *Set {
  	if orig.IsEmpty() {
  		return &Set{
  			IDs: identSet{
  				id: struct{}{},
  			},
  		}
  	}
  	if orig.All {
  		return orig
  	}
  	if _, ok := orig.IDs[id]; ok {
  		return orig
  	}
  
  	// Need to make a copy of orig.IDs to add 'id' there.
  	extended := make(identSet, len(orig.IDs)+1)
  	for origID := range orig.IDs {
  		extended[origID] = struct{}{}
  	}
  	extended[id] = struct{}{}
  
  	return &Set{
  		IDs:    extended,
  		Groups: orig.Groups,
  	}
  }
docs: // Extend returns a throw-away set that has one additional member.
  //
  // The returned set must not be modified, since it references data of the
  // original set (to avoid unnecessary copying).