RosettaCodeData/Task/Loops-For-with-a-specified-step/E/loops-for-with-a-specified-step-2.e
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

17 lines
314 B
Text

def stepRange(low, high, step) {
def range {
to iterate(f) {
var i := low
while (i <= high) {
f(null, i)
i += step
}
}
}
return range
}
for i in stepRange(2, 9, 2) {
print(`$i, `)
}
println("who do we appreciate?")