title: Common Lisp: how to display a dot?
body: <p>I want to use the dot (.) as a symbol, like <code>a</code> or <code>b</code>.</p>
  
  <p>I found that I can do so by quoting and escaping the dot. However, when the dot is displayed on the screen, it is surrounded by vertical bars:</p>
  
  <pre><code>'\.
  =&gt; |.|
  </code></pre>
  
  <p>How can I get the dot displayed without the vertical bars?</p>
  
  <p>Update: Thank you jkiiski, using <code>format</code> works great. Here's why I am doing this: For my own education, I wrote a function to convert a list in list notation to the equivalent list in dot notation. Thanks to your help, now it works great:</p>
  
  <pre><code>(defun list-notation-to-dot-notation (lst)
      (cond ((atom lst) lst)
            ((null (cdr lst)) (list (list-notation-to-dot-notation (car lst)) '\. 'NIL))
            (t (list (list-notation-to-dot-notation (car lst)) '\. (list-notation-to-dot-notation (cdr lst))))))
  
  (defun list-2-dot (lst)
      (format t "~a" (list-notation-to-dot-notation lst)))
  
  (list-2-dot '(a))
  =&gt; (A . NIL)
  
  (list-2-dot '(a b))
  =&gt; (A . (B . NIL))
  
  (list-2-dot '((a) b))
  =&gt; ((A . NIL) . (B . NIL))
  
  (list-2-dot '(a (b) c))
  =&gt; (A . ((B . NIL) . (C . NIL)))
  
  (list-2-dot '(a b (c)))
  =&gt; (A . (B . ((C . NIL) . NIL)))
  
  (list-2-dot '((a) (b) (c)))
  =&gt; ((A . NIL) . ((B . NIL) . ((C . NIL) . NIL)))
  </code></pre>