[Haskell-beginners] about Data.BinaryTree

Daniel Fischer daniel.is.fischer at web.de
Mon Dec 29 01:06:26 EST 2008


Am Montag, 29. Dezember 2008 04:22 schrieb Liu Jian:
> Hi All,
>
>    Is there any implementation of binary tree in haskell library? for
> example, "insert   lookup  empty  adjust   isEmpty  delete" including in
> it.
>
>   cheers,

Well, depending on your use-case, it might be worth looking at Data.Set and 
Data.Map, they're implemented via binary trees.
There's an AVL-tree imlementation in
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/collections

And generally a lot of data structures on Hackage, suffix-trees, 
finger-trees...

There should be something that suits your needs.

Cheers,
Daniel


More information about the Beginners mailing list