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 _.sortedLastIndex #2106

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

Conversation

jridgewell
Copy link
Collaborator

Closes #1882.

@jashkenas
Copy link
Owner

Parity sure — but are there any real-world use cases for this?

@jridgewell
Copy link
Collaborator Author

Just _.lastIndexOf supporting binary search.

@jgonggrijp
Copy link
Collaborator

I'm favor of having both lower bound and upper bound variants of binary search, but the underlying implementation should take a binary compare predicate instead of a boolean flag that lets you choose only between < and <=.

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

Successfully merging this pull request may close these issues.

_.sortedLastIndex
3 participants