function range(start, stop, step) { var a = [start], b = start; while (b < stop) { a.push(b += step || 1); } return a; }