documentcloud/underscore-contrib — pull request #129 by keroxp (2014-03-05 05:45:43+00:00)
Title: add array.divide.js

hi, I added array.divide.js, which has 2 method.

Firstly, 'at' method, enable you to access array or string's content with location and length.
This method calls 'slice' prototype of Array or String.

Secondly, 'divide' method enable you to divide an array into grouped array with given predicate.
The difference between _.groupedBy is as follows:
_.grouopBy groups array's contents regardless of those indexes by given predicate block,
on the other hand, _.divide groups array(or string) contents which are in sequence.

for example, _.divide divides [1,2,2,3,1,1,5] into [[1],[2,2],[3],[1,1],[5]] .
'1' in the head and two '1' in the middle was grouped into the other.

please see source code for detail,
thank you :D