function replace$1(t, d) {
    return setid(d, tupleid(t));
  }
Replace an existing tuple with a new tuple.
@param {object} t - The existing data tuple.
@param {object} d - The new tuple that replaces the old.
@return {object} The new tuple.