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

Examples

# Example 1

(range 1, 5)   



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



# Example 2

(range 1, 5, inclusive: true)



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



# Example 3

(range 1, 5, step: 2)



#=> (ring 1, 3)



# Example 4

(range 1, -5, step: 2)



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



# Example 5

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



#=> -3