Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- 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
Instances
Magma () Source # | |
Defined in Data.Magma | |
Magma All Source # | |
Magma Any Source # | |
Ord a => Magma (Min a) Source # | |
Ord a => Magma (Max a) Source # | |
Monoid m => Magma (WrappedMonoid m) Source # | |
Defined in Data.Magma (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source # | |
Magma (First a) Source # | |
Magma (Last a) Source # | |
Magma a => Magma (Dual a) Source # | |
Magma (Endo a) Source # | |
Num a => Magma (Sum a) Source # | |
Num a => Magma (Product a) Source # | |
Magma (BinaryTree a) Source # | |
Defined in Data.Magma (<>) :: BinaryTree a -> BinaryTree a -> BinaryTree a Source # | |
(Magma a, Magma b) => Magma (a, b) Source # | |
Defined in Data.Magma |
data BinaryTree a Source #
Leaf a | |
Node (BinaryTree a) (BinaryTree a) |
Instances
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)