The result is similar to the text exept for repeating of each single name.
tom dick harry
'tom
'tom
dick harry sue
'dick
'dick
'harry
'harry
'sue
'sue
. . Queue is empty.
I have not found any errors in the code that I typed in. I have used the Macro Stepper provided and that didn’t reveal anything.
I go over each example that I run to be (sorta) sure that I understand what all of the pieces are doing and I do pretty well for a newbie wrapping my aging brain around them however, this one has me stumped , If any of you are bored please take a look and see if you spot anyything.
Cheers,
Munroe
When a text book/document for Racket contains a snippet like this:
(define queue (new queue% [queue-list '(tom dick harry)]))
(send queue print-queue)
(send queue dequeue)
; ’tom
it is trying to suggest that ’tim is the expected response. Don’t type it in, Or remove ’tom, ’dick, ’harry, and ’sue from your example and you will see the names only once.
Thanks for the reply, even though it’s all rather embarrassing! I was clearly guilty of not seeing the forest because of all the trees! But what the heck it’s all part of the learning experience. BTW the book is “Racket Programming the Fun Way”.