title: Pretty print a tree
body: <p>Let's say I have a binary tree data structure defined as follows</p>
  
  <pre><code>type 'a tree =
      | Node of 'a tree * 'a * 'a tree
      | Nil
  </code></pre>
  
  <p>I have an instance of a tree as follows:</p>
  
  <pre><code>let x =
    Node
      (Node (Node (Nil,35,Node (Nil,40,Nil)),48,Node (Nil,52,Node (Nil,53,Nil))),
       80,Node (Node (Nil,82,Node (Nil,83,Nil)),92,Node (Nil,98,Nil)))
  </code></pre>
  
  <p>I'm trying to pretty-print the tree into something easy to interpret. Preferably, I'd like to print the tree in a console window like this:</p>
  
  <pre><code>        _______ 80 _______
         /                  \
      _ 48 _              _ 92 _
     /      \            /      \
   35       52         82       98
     \       \        /
      40      53    83
  </code></pre>
  
  <p><strong>What's an easy way to get my tree to output in that format?</strong></p>