code: function distinctTransducer(fn, xform) {
    let last = NO_VALUE;
  
    return {
      [p.init]() {
        return xform[p.init]();
      },
  
      [p.step](acc, input) {
        if (last !== NO_VALUE && fn(input, last)) {
          return acc;
        }
        last = input;
        return xform[p.step](acc, input);
      },
  
      [p.result](value) {
        return xform[p.result](value);
      }
    };
  }
docs: A transducer function that is returned by the `{@link module:xduce.transducers.distinct|distinct}`,
  `{@link module:xduce.transducers.distinctBy|distinctBy}`, and
  `{@link module:xduce.transducers.distinctWith|distinctWith}` transducers.
  
  @private
  
  @param {function} fn The two-argument comparator function that defines when two values are equal.
  @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.