Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- class Magma a where
- (<>) :: a -> a -> a
- data BinaryTree a
- = Leaf a
- | Node (BinaryTree a) (BinaryTree a)
- cataBinaryTree :: (a -> r) -> (r -> r -> r) -> BinaryTree a -> r
- anaBinaryTree :: (b -> Either a (b, b)) -> b -> BinaryTree a
- foldMap :: Magma m => (a -> m) -> BinaryTree a -> m
- _Leaf :: forall p f a. (Choice p, Applicative f) => p a (f a) -> p (BinaryTree a) (f (BinaryTree a))
- _Node :: forall p f a. (Choice p, Applicative f) => p (BinaryTree a, BinaryTree a) (f (BinaryTree a, BinaryTree a)) -> p (BinaryTree a) (f (BinaryTree a))
- nodeLeft :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a)
- nodeRight :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a)
Documentation
data BinaryTree a Source
Leaf a | |
Node (BinaryTree a) (BinaryTree a) |
Monad BinaryTree | |
Functor BinaryTree | |
Applicative BinaryTree | |
Foldable BinaryTree | |
Traversable BinaryTree | |
Eq a => Eq (BinaryTree a) | |
Ord a => Ord (BinaryTree a) | |
Read a => Read (BinaryTree a) | |
Show a => Show (BinaryTree a) | |
NFData a => NFData (BinaryTree a) | |
Magma (BinaryTree a) |
cataBinaryTree :: (a -> r) -> (r -> r -> r) -> BinaryTree a -> r Source
anaBinaryTree :: (b -> Either a (b, b)) -> b -> BinaryTree a Source
foldMap :: Magma m => (a -> m) -> BinaryTree a -> m Source
_Leaf :: forall p f a. (Choice p, Applicative f) => p a (f a) -> p (BinaryTree a) (f (BinaryTree a)) Source
_Leaf
:: Prism' (BinaryTree
a) a
_Node :: forall p f a. (Choice p, Applicative f) => p (BinaryTree a, BinaryTree a) (f (BinaryTree a, BinaryTree a)) -> p (BinaryTree a) (f (BinaryTree a)) Source
_Node
:: Prism' (BinaryTree
a) (BinaryTree
a,BinaryTree
a)
nodeLeft :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a) Source
nodeLeft
:: Traversal' (BinaryTree
a) (BinaryTree
a)
nodeRight :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a) Source
nodeRight
:: Traversal' (BinaryTree
a) (BinaryTree
a)