Created
August 28, 2019 20:08
-
-
Save nikasulo/cd5b8de586fa1f1cd7a1ee29b0991212 to your computer and use it in GitHub Desktop.
Printing the content of the stack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_stack | |
while @first.next_node | |
print @first.value | |
@first = @first.next_node | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment