Safe Haskell | None |
---|
Documentation
data Vec :: Nat -> * -> * where #
Fixed size vectors.
pattern Empty :: Vec 0 a | |
pattern (:>) :: a -> Vec n a -> Vec (n + 1) a infixr 5 | Add an element to the head of a vector.
Can be used as a pattern:
Also in conjunctions with (
|
data RTree :: Nat -> * -> * where #
Perfect depth binary tree.
- Only has elements at the leaf of the tree
- A tree of depth d has 2^d elements.
pattern LR :: a -> RTree 0 a | Leaf of a perfect depth tree
Can be used as a pattern:
|
pattern BR :: RTree d a -> RTree d a -> RTree (d + 1) a | Branch of a perfect depth tree
Case be used a pattern:
|