Am I reading this correctly? The standard library has no built in function to get a slice of keys from a map? You need to iterate every single time and build up an extra list??

@mauve I'm not sure Rust has one either for hash maps (keys aren't stored in a predictable order so it wouldn't make that much sense) but there's probably one for btree maps.

@jeremy_list Interesting. No way to get an iterator for jusr keys either?

@mauve yes you can get an iterator for keys for both map implementations in the standard library but not one for keys in a certain range other than `.keys().filter(...)`

Follow

@jeremy_list that's reasonable. Afaik golang doesn't even have first class iterators in the std 😱

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.