Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data BinLeafTree v a
- = Leaf a
- | Node (BinLeafTree v a) v (BinLeafTree v a)
- class Semigroup v => Measured v a | a -> v where
- measure :: a -> v
- node :: Measured v a => BinLeafTree v a -> BinLeafTree v a -> BinLeafTree v a
- asBalancedBinLeafTree :: NonEmpty a -> BinLeafTree Size (Elem a)
- newtype Size = Size Int
- newtype Elem a = Elem {
- _unElem :: a
Documentation
data BinLeafTree v a Source
Leaf a | |
Node (BinLeafTree v a) v (BinLeafTree v a) |
Measured v a => Measured v (BinLeafTree v a) Source | |
Functor (BinLeafTree v) Source | |
Foldable (BinLeafTree v) Source | |
Traversable (BinLeafTree v) Source | |
Foldable1 (BinLeafTree v) Source | |
(Eq v, Eq a) => Eq (BinLeafTree v a) Source | |
(Ord v, Ord a) => Ord (BinLeafTree v a) Source | |
(Read v, Read a) => Read (BinLeafTree v a) Source | |
(Show v, Show a) => Show (BinLeafTree v a) Source | |
Measured v a => Semigroup (BinLeafTree v a) Source |
node :: Measured v a => BinLeafTree v a -> BinLeafTree v a -> BinLeafTree v a Source
smart constructor
asBalancedBinLeafTree :: NonEmpty a -> BinLeafTree Size (Elem a) Source