1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 1 3 3 9 3 1 | define(['./max', './pluck'], function (max, pluck) {
/**
* Merges together the values of each of the arrays with the values at the
* corresponding position.
*/
function zip(arr){
var len = arr? max(pluck(arguments, 'length')) : 0,
result = new Array(len),
i = -1;
while (++i < len){
result[i] = pluck(arguments, i);
}
return result;
}
return zip;
});
|