title: Delete function in binary search tree in haskell
body: <p>How can I implement a function to delete an element in a binary search tree?
  This is my tree:</p>
  
  <pre><code>data Tree a = Leaf
              | Node a (Tree a) (Tree a)
  </code></pre>
  
  <p>I know that in case my tree is a Leaf</p>
  
  <pre><code>delete :: (Ord a) =&gt; a -&gt; Tree a -&gt; Tree a
  delete _ Leaf   = Leaf
  </code></pre>
  
  <p>and in case left and right are not empty, I have to delete the minimum from right (or maximum from left) and it became the root. But, how can I implement it??</p>