RosettaCodeData/Task/Loops-For-with-a-specified-step/Panda/loops-for-with-a-specified-step.panda
2023-07-01 13:44:08 -04: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)