code: function takeTransducer(n, xform) {
    let i = 0;
  
    return {
      [p.init]() {
        return xform[p.init]();
      },
  
      [p.step](acc, input) {
        let result = acc;
  
        if (i < n) {
          result = xform[p.step](acc, input);
          if (i === n - 1) {
            result = ensureCompleted(result);
          }
        }
        i++;
        return result;
      },
  
      [p.result](value) {
        return xform[p.result](value);
      }
    };
  }
docs: A transducer function that is returned by the `{@link module:xduce.transducers.take|take}` transducer.
  
  @private
  
  @param {module:xduce~transducerObject} xform The transducer object that the new one should be chained to.
  @return {module:xduce~transducerObject} A new transducer object, performing no transformation and chaining to the
  provided transducer object.