Permalink
Browse files

Make use of _.times new found ability to deal with negatives

  • Loading branch information...
1 parent 3e9e629 commit c9831a9d63da255f653402575bfed5e7610f0c69 @almost almost committed Apr 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 underscore.js
View
@@ -507,7 +507,7 @@
// [['a','b','c'],[1,2,3]].
_.unzip = function(tuples) {
var maxLen = _.max(_.pluck(tuples, "length"))
- return _.map(_.range(maxLen), _.partial(_.pluck, tuples));
+ return _.times(maxLen, _.partial(_.pluck, tuples));
};
// Converts lists into objects. Pass either a single array of `[key, value]`

0 comments on commit c9831a9

Please sign in to comment.