function chunk(array, size, guard) {
      size = (guard || size == null) ? 1 : nativeMax(+size || 1, 1);

      var index = 0,
          length = array ? array.length : 0,
          resIndex = -1,
          result = Array(ceil(length / size));

      while (index < length) {
        result[++resIndex] = slice(array, index, (index += size));
      }
      return result;
    }
Creates an array of elements split into groups the length of `size`.
If `collection` can't be split evenly, the final chunk will be the remaining
elements.

@static
@memberOf _
@category Array
@param {Array} array The array to process.
@param {numer} [size=1] The length of each chunk.
@param- {Object} [guard] Enables use as a callback for functions like `_.map`.
@returns {Array} Returns the new array containing chunks.
@example

_.chunk(['a', 'b', 'c', 'd'], 2);
// => [['a', 'b'], ['c', 'd']]

_.chunk(['a', 'b', 'c', 'd'], 3);
// => [['a', 'b', 'c'], ['d']]