Skip to content

Commit

Permalink
i param test passes
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 8, 2012
1 parent 123d4d6 commit 4b53eee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = function (xs, fn) {
var res = [];
for (var i = 0; i < xs.length; i++) {
var x = fn(xs[i]);
var x = fn(xs[i], i);
if (Array.isArray(x)) res.push.apply(res, x);
else res.push(x);
}
Expand Down

0 comments on commit 4b53eee

Please sign in to comment.