docs: 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);
      }
    };
  }