title: Returning Minimum Value in Binary Tree
body: <p>I'm trying to write code that if given a tree, will go through the tree and return the minimum value in that tree, if the tree is empty, it will return val. What I have right now compiles but will not run. Any help?</p>
  
  <pre><code>minValue :: Ord a =&gt; a -&gt; BTree a -&gt; a
  minValue val Empty = val
  minValue val (BNode v left Empty) = minimum [minValue v left]
  minValue val (BNode v Empty right) = minimum [minValue v right]
  minValue val (BNode v left right) = minimum ([minValue v left]++[minValue v right])
  </code></pre>