code: function chunkByTransducer(fn, xform) {
    let part = [];
    let last = NO_VALUE;
  
    return {
      [p.init]() {
        return xform[p.init]();
      },
  
      [p.step](acc, input) {
        const current = fn(input);
        let result = acc;
        if (last === NO_VALUE || sameValueZero(current, last)) {
          part.push(input);
        } else {
          result = xform[p.step](result, part);
          part = [input];
        }
        last = current;
        return result;
      },
  
      [p.result](value) {
        const count = part.length;
        if (count > 0) {
          return ensureUncompleted(xform[p.step](value, part.slice(0, count)));
        }
        return xform[p.result](value);
      }
    };
  }
docs: A transducer function that is returned by the `{@link module:xduce.transducers.chunkBy|chunkBy}` transducer.
  
  @private
  
  @param {function} fn The function that defines when a chunk ends and the next chunk begins.
  @param {module:xduce~transducerObject} xform The transducer object that the new one should be chained to.
  @return {module:xduce~transducerObject} A new transducer object chained to the provided transducer object.