code: func (h *HLLPP) Merge(other *HLLPP) error {
  	if h.p != other.p || h.pp != other.pp {
  		return errors.New("HLLPPs have different parameters")
  	}
  
  	if h.sparse && !other.sparse {
  		h.toNormal()
  	}
  
  	if other.sparse {
  		other.flushTmpSet()
  	}
  
  	if h.sparse && other.sparse {
  		tmpSet := make([]uint32, other.sparseLength)
  		reader := newSparseReader(other.data)
  		for index := 0; !reader.Done(); index++ {
  			tmpSet[index] = reader.Next()
  		}
  		h.mergeSparse(tmpSet)
  	} else if !h.sparse && !other.sparse {
  		for i := uint32(0); i < h.m; i++ {
  			rho := getRegister(other.data, other.bitsPerRegister, i)
  			h.updateRegisterIfBigger(i, rho)
  		}
  	} else {
  		reader := newSparseReader(other.data)
  		for !reader.Done() {
  			idx, rho := other.decodeHash(reader.Next(), other.p)
  			h.updateRegisterIfBigger(idx, rho)
  		}
  	}
  
  	return nil
  }
docs: // Merge turns h into the union of h and other. h and other must have the same
  // p and p' values.