code: function take(collection, n) {
    const [col, num] = isNumber(collection) ? [null, collection] : [collection, n];
    return col ? sequence(col, take(num)) : xform => takeTransducer(num, xform);
  }
docs: **Creates a new collection containing only the first `n` elements of the input collection.**
  
  Note that this is an excellent way to turn an 'infinite' collection - one that doesn't have a well-defined end, like
  a stream, channel, or infinite generator - into a finite collection.
  
  If no collection is provided, a function is returned that can be passed to `{@link module:xduce.sequence|sequence}`,
  et al.
  
  ```
  // An iterator that will return every positive integer, one at a time per next() call
  function* naturals() {
  let x = 1;
  while (true) {
  yield x++;
  }
  }
  
  const result = take(naturals(), 3);
  // result is now an iterator that has only three values in it
  result.next().value === 1;  // true
  result.next().value === 2;  // true
  result.next().value === 3;  // true
  result.next().done;         // true
  ```
  
  @memberof module:xduce.transducers
  
  @param {*} [collection] An optional input collection that is to be transduced.
  @param {number} n The number of elements at the beginning of the input collection that should be kept in the
  output collection.
  @return {(*|module:xduce~transducerFunction)} If a collection is supplied, then the function returns a new
  collection of the same type containing only the first `n` elements. 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.