:sunrise_over_mountains: :wave::skin-tone-2: Hi f...
# troubleshooting
m
🌄 👋🏻 Hi folks, question: when iterating over
MapState
(e.g.,
MapState.keys()
,
MapState.values()
,
MapState.entries()
), are there any ordering guarantees (e.g., lexicographical order)?
k
Another point I should have made…if you need to be able to get specific items from
MapState
in order, you can use additional state. For example, if you were trying to implement a FIFO queue… 1. Use
MapState<Long, YourType>
, where the
Long
is an index. 2. Then have two additional
ValueState<Long>
states, one for the head index and one for the tail index.
gratitude thank you 1
m
Thanks @Ken Krugler! 🚀