-
- Notifications
You must be signed in to change notification settings - Fork 359
Simple bubble sort in Smalltalk. #432
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
Conversation
Spaces, not tabs!
Hi, thanks for your contribution! |
I think you also didn't provide an example array, that gets sorted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first two comments are personal opinion, and don't really affect my review one way or the other. Please do add an example showing how it's called, though.
I'm excited to see smalltalk, it's been on my list of languages of interest! You should also add smalltalk to |
Ok, everything should be done now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing, which was the result of going along with my previous CRs.
thisElem := self at: index. | ||
nextElem := self at: index + 1. | ||
(thisElem > nextElem) ifTrue: [ | ||
self at: nextIndex put: thisElem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextIndex
no longer exists, this should be thisIndex + 1
Bubble sort in Smalltalk. Let's revive this language together!
Is this commit okay?