code: function repeatTransducer(n, xform) {
    return {
      [p.init]() {
        return xform[p.init]();
      },
  
      [p.step](acc, input) {
        let result = acc;
        for (let i = 0; i < n; ++i) {
          result = xform[p.step](result, input);
          if (isCompleted(result)) {
            break;
          }
        }
        return result;
      },
  
      [p.result](value) {
        return xform[p.result](value);
      }
    };
  }
docs: A transducer function that is returned by the `{@link module:xduce.transducers.flatten|flatten}` transducer.
  
  @private
  
  @param {number} n The number of times that each element should be repeated in the output collection.
  @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.