The for loop is not returning the increasing count variable.
It acts as though the range function is not being called, but it is.
function* range (limit, count = 0) {
if (count >= limit) return
yield count
range(limit, count + 1)
}
for (let i of range(16)) {
console.log(i)
}