title: How to write a custom pretty printer
body: <p>A problem that has frequently come up in my career is I have some kind of data structure (perhaps an s-expression) and I want to print it in a human readable form complete with reasonable indentation choices.</p>
  
  <p>Is there a book or blog entry that describes how to do this elegantly?  I am interested in the algorithm more than a specific library.</p>