Skip to content
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

Add Vector::insert_ord_by method #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vlmutolo
Copy link

@vlmutolo vlmutolo commented Dec 1, 2020

Vector::insert_ord_by is a convenience function I find myself frequently needing. It's useful for when you want to insert an element into a Vector using a custom comparison function. It also gives a nice symmetry to have all of binary_search_by, insert_ord_by, and sort_by defined. Right now we're missing insert_ord_by, which this PR implements.

@jneem
Copy link

jneem commented Aug 10, 2021

Hi @vlmutolo, are you interested in opening a PR on imbl? I'd be happy to include this; my only comment is that you can use Ordering::reverse to simplify the example.

@vlmutolo
Copy link
Author

Sure! Thanks for trying to take on the maintenance. I'll submit a PR tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants