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

homework #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

BlueColorPencils
Copy link

No description provided.

current = current.next_node
end
full_list += [current.value.to_s]
return p "Size is #{full_list.length}."
end

Choose a reason for hiding this comment

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

These looks generally good -- however, both methods are creating a side effect of printing something. If you are not asked to print something out, then you don't necessarily want to because it limits how you can use that method in the future.

I would expect that a method with a ? at the end would return a boolean and not print anything out.

I would also expect that a size method would only return a single numerical value and nothing else.

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