title: Print lisp function readably
body: <p>I'm trying out lisp and working through the book Practical Common Lisp at <a href="http://www.gigamonkeys.com/book/">http://www.gigamonkeys.com/book/</a>.</p>
  
  <p>Is there a command which can print a function which was previously defined at the REPL in a way that can later be read?  I've tried</p>
  
  <pre><code>(print #'function-name)
  </code></pre>
  
  <p>but this results in output enclosed in <code>#&lt;></code> which can't be read back in (and if <code><code>*print-readably</code>*</code> is set to <code>T</code> I just get an error).  I get the same results using <code>princ</code> or <code>prin1</code> instead of <code>print</code>.</p>
  
  <p>I'm a bit surprised this isn't easy to find. Several of the things I've read on lisp encourage experimentation at the REPL, but if you can't save your functions after you've entered them, you're forced to write them in a separate file before entering them, which partly defeats the point.</p>