-
Notifications
You must be signed in to change notification settings - Fork 0
hcliu/circular_list
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Circular List ============= A circular list data structure for Ruby. How to install -------------- gem install circular_list OR gem 'circular_list' in Gemfile How to use ---------- require 'rubygems' require 'circular_list' c = CircularList::List.new([1,2,3]) c.fetch_next => 2 c.fetch_next => 3 c.fetch_next => 1 c.fetch_next => 2 c = CircularList::List.new([1,2,3]) c.fetch_previous => 3 c.fetch_previous => 2 c.fetch_previous => 1 c.fetch_previous => 3 See specs https://github.com/bangthetable/CircularList/blob/master/spec/circular_list/list_spec.rb for more examples.
About
A cyclic data structure for Ruby
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published