I'm sorry for being lazy. After reviewing the answer, I believe I
understand the original code from the book and what the SO answer is
trying to do. The tail method return a new queue, popping the first
element that was inserted in the queue, copy the trailing list over to
the head while emptying the leading list. But I believe the head
doesn't behave the same way as the tail so it's a bit weird. But
overall, I understand the code now.
Thanks!
On Sep 1, 9:25 pm, Anthony Doan <
mythicalprogram...@gmail.com> wrote:
>
http://stackoverflow.com/questions/7278772/queue3-chapter-19-in-progr...