Are there any invariants you wish to maintain when inserting?&nbsp; If not, it&#39;s rather trivial.<br><br>&nbsp; -- Lennart<br><br><div class="gmail_quote">On Fri, May 9, 2008 at 11:35 PM, PR Stanley &lt;<a href="mailto:prstanley@ntlworld.com">prstanley@ntlworld.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>
data Ord a =&gt; Tree a = Nil | Node (Tree a) a (Tree a)<br>
How would one go about inserting a value in a binary search tree of the above description?<br>
<br>
Cheers<br>
Paul<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>