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

Return the negative index position if not found. #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Return the negative index position if not found. #7

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 17, 2019

Make it possible to insert the value at correct position.
Add Example2 to show how to do this

Make it possible to insert the value at correct position.
Add Example2 to show how to do this
After some tests -> updated the code
@ghost
Copy link
Author

ghost commented Jul 17, 2019

After some tests, had to update the code

@@ -21,7 +21,7 @@ function compileSearch(funcName, predicate, reversed, extraArgs, earlyOut) {
}
code.push("}")
if(earlyOut) {
code.push("return -m - 1};")
code.push("return -l - 1};")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return -1 -1 is just return 0, looks like a bug.

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