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

Removed an unnecessary comparison #695

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

Filip-afKlinteberg
Copy link
Contributor

Removed && i > 0 in the solution to assignment 7.2.5d as discussed in the discord-server

Since an arrays length can't be shorter than 0 the minimum value for result.length is 1.
if i < result.length then [...] i += 1 guarantees that i is at least equal to 1, so a comparison to see if it's larger than 0 is unnecessary.

The first commit is related to another issue, but I undid the change I made since that issue hasn't been solved yet.

Made the description of the xs.indices match the description in the compendium.
Removed && i > 0 in the solution to assignment 7.2.5d
@bjornregnell
Copy link
Member

Thanks! And good that you removed the unrelated change from this PR, but you are welcome with another PR on the until proposal..

@bjornregnell bjornregnell merged commit b042dea into lunduniversity:master Oct 12, 2022
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