I have a list of strings in kumo. I am printing three strings. I am getting them on 3 lines. I want them on one line separated by spaces. I am using the following code:
(display (first kumo))
(display (fourth kumo))
(display (second kumo))
or
(printf "~a~a~a" (first kumo)(fourth kumo)(second kumo))
Hmm… unless I’m misunderstanding you, Racket already does that. Here’s a small (complete) program illustrating this:
… which produces
If you want spaces between the words, put them in the format string:
… which produces
You can do the same thing with
display, by displaying a string containing a single space in between the calls that display the words.If I had to guess at your problem, I’d say that the strings you’re displaying have newlines embedded in them.