3 ms·
Also that it maintains insertion order (since Ruby 1.9) opens up more use cases.
by gilfoyle 3y ago
Also that it maintains insertion order (since Ruby 1.9) opens up more use cases.
- software_writer 3y agoDo you know any use cases, other than iteration? Would love to know any interesting ones. Thanks!
- byroot 3y agoYeah, you can use it to implement a simple (but not necessarily very performant) LRU: https://github.com/SamSaffron/lru_redux/blob/037ee594aded59764487d4a1a5b4077fa710ae3b/lib/lru_redux/cache.rb https://github.com/SamSaffron/lru_redux/blob/037ee594aded597...
- software_writer 3y agoVery cool, thanks for sharing!