code: function repeat(collection, n) {
    const [col, num] = isNumber(collection) ? [null, collection] : [collection, n];
    return col ? sequence(col, repeat(num)) : xform => repeatTransducer(num, xform);
  }
docs: **Repeats each element from the input collection `n` times in the output collection.**
  
  These elements are put into the main output collection, not into subcollections. In other words, each input element
  creates `n` output elements.
  
  If no collection is provided, a function is returned that can be passed to `{@link module:xduce.sequence|sequence}`,
  et al.
  
  ```
  const result = repeat([1, 2, 3, 4, 5], 3);
  // result = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]
  ```
  
  @memberof module:xduce.transducers
  
  @param {*} [collection] An optional input collection that is to be transduced.
  @param {number} n The number of times that each element from the input collection should be repeated in the output
  collection.
  @return {(*|module:xduce~transducerFunction)} If a collection is supplied, then the function returns a new
  collection of the same type with all of the elements of the input collection repeated. If no collection is
  supplied, a transducer function, suitable for passing to `{@link module:xduce.sequence|sequence}`,
  `{@link module:xduce.into|into}`, etc. is returned.