Skip to content

Add Vector::insert_ord_by method#161

Open
vlmutolo wants to merge 1 commit intobodil:masterfrom
vlmutolo:vector-insert-ord-by
Open

Add Vector::insert_ord_by method#161
vlmutolo wants to merge 1 commit intobodil:masterfrom
vlmutolo:vector-insert-ord-by

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