title: OCaml Binary Tree Mirror Image
body: <p>I'm learning OCaml for a class, and was given an assignment of computing the mirror image of a binary tree. I'm quite stuck and am not sure how to even start...</p>
  
  <pre><code>type btree = Empty | Node of int * btree * btree
  ;;
  
  let mirror : btree -&gt; btree
    = fun t -&gt; (* Code *)
  </code></pre>
  
  <p>Sample input:</p>
  
  <pre><code>let tree1 = Node(1, Node(2, Node(3, Empty, Empty), Empty), Node(4, Empty, Empty))
  ;;
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>mirror tree1 = Node(1, Node(4, Empty, Empty), Node(2, Empty, Node(3, Empty, Empty)))
  ;;
  </code></pre>