rangeGenerator
Creates a generator, that generates all values in the given range using the given step.
- Use a
whileloop to iterate fromstarttoend, usingyieldto return each value and then incrementing bystep. - Omit the third argument,
step, to use a default value of1.