Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 160 Bytes

cycle.md

File metadata and controls

14 lines (8 loc) · 160 Bytes

Cycle

ring = %w[one two three].cycle

p ring.take(5)

# Result:
# ["one", "two", "three", "one", "two"]

View Source