[Haskell-cafe] inserting values in a binary tree

Lennart Augustsson lennart at augustsson.net
Fri May 9 18:43:42 EDT 2008


Are there any invariants you wish to maintain when inserting?  If not, it's
rather trivial.

  -- Lennart

On Fri, May 9, 2008 at 11:35 PM, PR Stanley <prstanley at ntlworld.com> wrote:

> Hi
> data Ord a => Tree a = Nil | Node (Tree a) a (Tree a)
> How would one go about inserting a value in a binary search tree of the
> above description?
>
> Cheers
> Paul
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080509/35607d10/attachment.htm


More information about the Haskell-Cafe mailing list