Version with only one yield
iterator myStep(a, b:int):int =
let step = if a < b: 1 else: -1
var i = a
while (if 1 == step: i <= b else: i >= b):
yield i
i += step
Run
- Novice Question: Implement the Step functionality in VBA freeflow
- Novice Question: Implement the Step functionality in VBA ElegantBeef
- Novice Question: Implement the Step functionality in ... freeflow
- Novice Question: Implement the Step functionality... lscrd
- Novice Question: Implement the Step functiona... Symb0lica
