declare proc {For A B S P} proc {LoopUp C} if C==B then {P C} {LoopDown C+S} end end in if S>0 then {LoopUp A} end if S<0 then {LoopDown A} end end