Skip to content

Instantly share code, notes, and snippets.

@nikasulo
Created September 4, 2019 22:20
Show Gist options
  • Save nikasulo/43c4c0456d99e56781b3982b59597dc5 to your computer and use it in GitHub Desktop.
Save nikasulo/43c4c0456d99e56781b3982b59597dc5 to your computer and use it in GitHub Desktop.
Empty_into Method
def empty_into(container)
current = @first
while current do
container << current.value unless current.value == nil
self.popFront
current = current.next_node
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment