I'm trying out lisp and working through the book Practical Common Lisp at http://www.gigamonkeys.com/book/.
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
(print #'function-name)
but this results in output enclosed in #<> which can't be read back in (and if is set to *print-readably*T I just get an error). I get the same results using princ or prin1 instead of print.
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.