Open
Description
Hey, an idea... when dealing with ordered maps, it seems like it would be a common use case to be able to retrieve the index of an item by key
, so that you can create subsets of the ordered map using slice()
or similar.
Basically right now to slice an ordered map by key, I believe you have to iterate the key sequence first to figure out what index the key lives at, like so:
const index = orderedMap.keySeq().findIndex(k => k === key)
But this seems like it makes slice()
, etc by key much slower. Although it's a tradeoff of manipulation time vs. write time.
Thoughts?