code: function(n) {
          return function chunk(arg) {
            if ( Array.isArray(arg) ) {
              return arg.reduce((acc,_,i,a) => {
                return i % n === 0 ? acc.concat( [a.slice(i, i + n)] ) : acc;
              }, []);
            }
            else if ( typeof arg === 'string' ) {
              return arg.match( new RegExp('.{1,' + n + '}', 'g') ) || [];
            }
            else throw new TypeError('Incorrect type. Passed in value should be an array or string.');
          }
        }
docs: Returns an array of arrays or strings in chunks of n.
  
  chunkBy :: (n) → (a) → arr
  
  @param n - A number to use as chunk's length
  @returns function
  @param arg - An array or string to chunk
  @returns array