Copyright | (c) 2014, 2015 Athan Clark |
---|---|
License | BSD-style |
Maintainer | athan.clark@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
An implementation of left-child, right-sibling binary trees.
- newtype KnuthTree a = KnuthTree {
- unKnuthTree :: (a, KnuthForest a)
- firstTree :: KnuthForest a -> Maybe (KnuthTree a)
- size :: KnuthTree a -> Int
- elem :: Eq a => a -> KnuthTree a -> Bool
- isSubtreeOf :: Eq a => KnuthTree a -> KnuthTree a -> Bool
- isSubtreeOf' :: Eq a => KnuthTree a -> KnuthTree a -> Bool
- isProperSubtreeOf :: Eq a => KnuthTree a -> KnuthTree a -> Bool
- isProperSubtreeOf' :: Eq a => KnuthTree a -> KnuthTree a -> Bool
- isChildOf :: Eq a => a -> KnuthTree a -> Bool
- isDescendantOf :: Eq a => a -> KnuthTree a -> Bool
- isProperDescendantOf :: Eq a => a -> KnuthTree a -> Bool
- singleton :: a -> KnuthTree a
- delete :: Eq a => a -> KnuthTree a -> Maybe (KnuthTree a)
- union :: KnuthTree a -> KnuthTree a -> KnuthTree a
- intersection :: Eq a => KnuthTree a -> KnuthTree a -> Maybe (KnuthTree a)
- difference :: Eq a => KnuthTree a -> KnuthTree a -> Maybe (KnuthTree a)
Documentation
KnuthTree | |
|
Monad KnuthTree Source | |
Functor KnuthTree Source | |
Applicative KnuthTree Source | |
Foldable KnuthTree Source | |
Traversable KnuthTree Source | |
RoseTree KnuthTree Source | |
HasSingleton a (KnuthTree a) Source | |
Eq a => Eq (KnuthTree a) Source | |
Data a => Data (KnuthTree a) Source | |
Show a => Show (KnuthTree a) Source | |
Generic (KnuthTree a) Source | |
NFData a => NFData (KnuthTree a) Source | |
Semigroup (KnuthTree a) Source | |
HasUnion (KnuthTree a) Source | |
HasSize (KnuthTree a) Source | |
Arbitrary a => Arbitrary (KnuthTree a) Source | |
type Rep (KnuthTree a) Source | |
type Tail (KnuthTree a) = KnuthForest a Source | |
type Head (KnuthTree a) = a Source |
firstTree :: KnuthForest a -> Maybe (KnuthTree a) Source
Query
isDescendantOf :: Eq a => a -> KnuthTree a -> Bool Source
isProperDescendantOf :: Eq a => a -> KnuthTree a -> Bool Source