-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexable#reverse_map #8998
Comments
I'm not sure about this. There are surely use cases for that. We also have a lot more iteration methods than We already have efficient and composable iterators which can be used for that. A dedicated implementation is only significantly more performant for small sizes. The |
I agree, where does one draw the line with these specialised methods? I personally had a use for an efficient
|
I feel like these are getting too specialized. At the same time it seems to be why we support an open class model, so anyone can reopen any class. I think these should proliferate as shard, |
Yes, I don't think these are common enough to belong in the standard library. And if you need such things it shouldn't be that frequent so adding a reverse in between is usually fine. |
We have compact_map, flat_map... why not reverse_map?
Here's a gist with Array benchmarks... the benchmarking seems favourable.
I've got a PR with tests ready #8997
The text was updated successfully, but these errors were encountered: