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

Update collatz.js #67

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

Update collatz.js #67

wants to merge 2 commits into from

Conversation

Rudxain
Copy link

@Rudxain Rudxain commented Sep 16, 2022

Strict mode, better docs, refactoring, support for negatives, protection against infinite loops, etc...

I am creating a pull request for...

  • New algorithm
  • Update to an algorithm
  • Fix an error
  • Other -...

"Collatz conjecture" is not a sequence. The standard-de-facto name convention is "Hailstone sequence", that's why I edited the comments.

I added JSdoc to explicitly specify the expected type of n, to reduce the likelihood of misuse of that function

Better docs, refactoring, support for negatives, protection against infinite loops, etc...
@Rudxain
Copy link
Author

Rudxain commented Sep 16, 2022

I haven't tested it yet, that's why it's a draft. Please be patient, I'll test later

@Rudxain Rudxain marked this pull request as ready for review September 17, 2022 15:05
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.

1 participant