documentcloud/underscore — Issue #349: include partition in the core library
Author: boxxxie
Created: 2011-10-25 21:17:20+00:00
State: open

function partition(arr,size){
if(_.size(arr) <= size){return [arr];}
return [_.first(arr,size)].concat(partition(_.rest(arr,size),size));
}