The key to understanding what is happening is knowing that graphical-test-2 does not actually display anything!
graphical-test-2 is a function which returns a single value, a picture, and it is the DrRacket REPL that displays the picture. This means that the function graphical-test-3 produces 5 pictures wit the word "hello", discards them, than returns the last one with the word "world". The text only equivalent is using format, not printf, since printf actually displays the text and returns void.
To show all the pictures, you can put all the intermediate pictures in a list and return that:
This might be a really lovely example for 2htdp/universe. Basically: you define click-handlers, key-handlers, a function that maps a program state to an image, and away you go.
Yeah, actually, this would be kind of a perfect fit for 2htdp/image....
Excellent. The simple REPL version works nicely now. When I have a sec, I'll clean up the code, push it to github, and then start reading about 2htdp/universe.