16 lines
226 B
JavaScript
Raw Normal View History

2019-02-01 14:06:44 +01:00
'use strict'
function range(from, to) {
// TODO: make this inlined.
const list = new Array(to - from + 1)
for(let i = 0; i < list.length; ++i) {
list[i] = from + i
}
return list
}
module.exports = {
range
}