Create a ring buffer with the specified start, finish and step size

range

[start (number), finish (number), step_size (number)]

Create a new ring buffer from the range arguments (start, finish and step size). Step size defaults to 1. Indexes wrap around positively and negatively

Introduced in v2.2

Example 0 

(range 1, 5)   



#=> (ring 1, 2, 3, 4)



Example 1 

(range 1, 5, 1)



#=> (ring 1, 2, 3, 4)



Example 2 

(range 1, 5, 2)



#=> (ring 1, 3)



Example 3 

(range 1, -5, 2)



#=> (ring 1, -1, -3)



Example 4 

(range 1, -5, 2)[-1]



#=> -3