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

binary-search: use vectors instead of lists for the sorted-data #324

Merged
merged 2 commits into from
Dec 29, 2023

Conversation

dreig
Copy link
Contributor

@dreig dreig commented Dec 28, 2023

Additionally, I decided to go ahead and make it return #f when the target is not found instead of throwing an error, which is more in line with how the exercise is implemented in other tracks (Common Lisp, Scheme) and vector-binary-search in srfi-43: https://docs.racket-lang.org/srfi/srfi-std/srfi-43.html#vector-binary-search

If this later change is not ok, I will revert it.

addresses #323

also, return #f when target not found, which is more in line with how
the exercise is implemented in other tracks (Common Lisp, Scheme)
and `vector-binary-search` in srfi-43

https://docs.racket-lang.org/srfi/srfi-std/srfi-43.html#vector-binary-search
@BNAndras
Copy link
Member

Thanks, I’ll review this weekend and get back to you.

@BNAndras
Copy link
Member

Looks good. I'd suggest adding yourself as a contributor in the exercise's config file since the test suite and example changed a lot.

@dreig
Copy link
Contributor Author

dreig commented Dec 29, 2023

I don't know why the build is failing; The the last commit is so insignificant, I don't see how it could cause the failure. The previous commit passed all the checks.

@BNAndras
Copy link
Member

Agreed. Giving it one last shot and then merging it.

@BNAndras BNAndras merged commit 8c9221e into exercism:main Dec 29, 2023
7 checks passed
@BNAndras BNAndras added x:action/improve Improve existing functionality/content x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation labels Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/improve Improve existing functionality/content x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants