ruby - How to change step value inside the loop? -


I want to increase my step value in each loop movement, but my solution is not working.

  n = 1 (0..100). Step (n). X | Say x n + = 1 end  

Is there a way to change "n" or should I use "while loop" or smth else?

say:

P>

turns on the border, passing every nth element in the block Used to be. If the numbers in the range are included, then N is added for each walk.

So whatever you are trying to do can not be done with step . While or for loop, traditional should do the trick.


Comments