RosettaCodeData/Task/Loops-For-with-a-specified-step/Panda/loops-for-with-a-specified-step.panda
2016-12-05 23:44:36 +01:00

6 lines
165 B
Text

fun for(from,to,step) type integer,integer,integer->integer
t=to.minus(from).divide(step)
0..t.times(step).plus(from)
/test it for(1 6 2) -> 1 3 5
for(1 3 5)