module.exports = function loop (n, f) { var result = Array(n) for (var i = 0; i < n; ++i) { result[i] = f(i) } return result }