Skip to content

Improving Euclidean Algorithm in Swift #303

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

Merged
merged 2 commits into from
Jul 27, 2018
Merged

Improving Euclidean Algorithm in Swift #303

merged 2 commits into from
Jul 27, 2018

Conversation

Wesley-Arrington
Copy link
Contributor

In Swift parameters are immutable. The way this is typically dealt with is to create a local mutable version of the parameter with the same name. I had essentially done this but had not used the same name as the parameter.

So I replaced all 'A'/'B's in the code with 'a'/'b's. This helps the code to both be cleaner and more in line with the typical Swift style.

I also removed some whitespace.

- created local mutible var 'a'/'b' instead of local mutible var 'A'/'B'
- Improved whitespace
- Updating to show correct sections in Swift code
Copy link
Member

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

That's fine

@jiegillet jiegillet merged commit b4d9f46 into algorithm-archivists:master Jul 27, 2018
@Wesley-Arrington Wesley-Arrington deleted the fixEuclidSwift branch July 27, 2018 09:03
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