Use FORMAT.
~{
and ~}
denote iteration, ~A
denotes aesthetic printing, and ~^
(aka Tilde Circumflex in the docs) denotes printing the , only when something follows it.
* (format nil "~{~A~^, ~}" '( 1 2 3 4 ))
"1, 2, 3, 4"
*
Use FORMAT.
~{
and ~}
denote iteration, ~A
denotes aesthetic printing, and ~^
(aka Tilde Circumflex in the docs) denotes printing the , only when something follows it.
* (format nil "~{~A~^, ~}" '( 1 2 3 4 ))
"1, 2, 3, 4"
*