Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Provides an AVL tree.
Synopsis
- avlMax :: AVL i -> Maybe i
- avlMin :: AVL i -> Maybe i
- avlLookup :: Indexable i o v => o -> AVL i -> Maybe v
- avlHeight :: AVL i -> Int
- avlSize :: AVL i -> Int
- avlInsert :: Indexable i o v => i -> AVL i -> AVL i
- avlRemove :: Indexable i o v => o -> AVL i -> AVL i
- data AVL a
- avlRoot :: AVL i -> i
- avlPreorder :: AVL i -> [i]
- avlPostorder :: AVL i -> [i]
- avlInorder :: AVL i -> [i]
Documentation
An AVL tree.
Instances
Functor AVL Source # | |
Indexable i o v => AnyBST AVL i o v Source # | |
Defined in Data.Chatty.AVL anyBstInsert :: i -> AVL i -> AVL i Source # anyBstRemove :: o -> AVL i -> AVL i Source # anyBstMax :: AVL i -> Maybe i Source # anyBstMin :: AVL i -> Maybe i Source # anyBstLookup :: o -> AVL i -> Maybe v Source # anyBstEmpty :: AVL i Source # anyBstHead :: AVL i -> Maybe i Source # anyBstInorder :: AVL i -> [i] Source # | |
None (AVL a) Source # | |
Defined in Data.Chatty.AVL |
avlPreorder :: AVL i -> [i] Source #
Traverse the tree, order (head, left, right)
avlPostorder :: AVL i -> [i] Source #
Traverse the tree, order (left, right, head)
avlInorder :: AVL i -> [i] Source #
Traverse the tree, order (left, head, right)