code: function flattenTransducer(xform) {
    return {
      [p.init]() {
        return xform[p.init]();
      },
  
      [p.step](acc, input) {
        const subXform = {
          [p.init]() {
            return xform[p.init]();
          },
  
          [p.step](acc, input) {
            const v = xform[p.step](acc, input);
            return isCompleted(v) ? complete(v) : v;
          },
  
          [p.result](value) {
            return xform[p.result](value);
          }
        };
  
        return isIterable(input) ? reduce(input, subXform, acc) : subXform[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.flatten|flatten}` 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 chained to the provided transducer object.