mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
This allows us to traverse a list backwards, cycling to the bottom as needed. This code is going to be used for the "A" key that cycles upward in the stream sidebar. It's probably overkill for that use case, but it does give us O(1) behavior and avoids the pitfall of accidentally mutating a list when reversing it.