Music.Analysis.PF
 Portability portable Stability experimental Maintainer silva.samuel@alumni.uminho.pt
 Contents Product Combinators Renamings Coproduct Renamings Combinators Exponentiation Combinators Others Natural isomorphisms More funtions Algebras and Co-Algebras Algebras and Co-Algebras
Description
This module implements Point-Free library
Synopsis
 split :: (a -> b) -> (a -> c) -> a -> (b, c) (><) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) (!) :: a -> () p1 :: (a, b) -> a p2 :: (a, b) -> b i1 :: a -> Either a b i2 :: b -> Either a b (-|-) :: (a -> b) -> (c -> d) -> Either a c -> Either b d cond :: (b -> Bool) -> (b -> c) -> (b -> c) -> b -> c ap :: (a -> b, a) -> b expn :: (b -> c) -> (a -> b) -> a -> c grd :: (a -> Bool) -> a -> Either a a swap :: (a, b) -> (b, a) assocr :: ((a, b), c) -> (a, (b, c)) assocl :: (a, (b, c)) -> ((a, b), c) distr :: (a, Either b c) -> Either (a, b) (a, c) undistr :: Either (a, b) (a, c) -> (a, Either b c) flatr :: (a, (b, c)) -> (a, b, c) flatl :: ((a, b), c) -> (a, b, c) unflatr :: (a, b, c) -> (a, (b, c)) unflatl :: (a, b, c) -> ((a, b), c) pwnil :: a -> (a, ()) coswap :: Either a b -> Either b a coassocr :: Either (Either a b) c -> Either a (Either b c) maybe2either :: Maybe a -> Either () a either2maybe :: Either () a -> Maybe a e2m :: Either () a -> Maybe a m2e :: Maybe a -> Either () a outL :: [a] -> Maybe (a, [a]) cataL :: (Maybe (a, c) -> c) -> [a] -> c inL :: Maybe (a, [a]) -> [a] anaL :: (c -> Maybe (a, c)) -> c -> [a] hyloL :: (Maybe (c, b) -> b) -> (a -> Maybe (c, a)) -> a -> b mapL :: (a -> b) -> [a] -> [b] concatL :: [[a]] -> [a] reverseL :: [a] -> [a] outL1 :: [a] -> Maybe (Either a (a, [a])) cataL1 :: (Maybe (Either a (a, c)) -> c) -> [a] -> c inL1 :: Maybe (Either a (a, [a])) -> [a] anaL1 :: (c -> Maybe (Either a (a, c))) -> c -> [a] hyloL1 :: (Maybe (Either d (c, b)) -> b) -> (a -> Maybe (Either d (c, a))) -> a -> b
Product
Combinators
 split :: (a -> b) -> (a -> c) -> a -> (b, c) Source
split
 (><) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) Source
product
 (!) :: a -> () Source
Renamings
 p1 :: (a, b) -> a Source
fst
 p2 :: (a, b) -> b Source
snd
Coproduct
Renamings
 i1 :: a -> Either a b Source
Left
 i2 :: b -> Either a b Source
Right
Combinators
 (-|-) :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source
sum
 cond :: (b -> Bool) -> (b -> c) -> (b -> c) -> b -> c Source
McCarthy's conditional:
Exponentiation
Combinators
 ap :: (a -> b, a) -> b Source
ap
 expn :: (b -> c) -> (a -> b) -> a -> c Source
expn
Others
 grd :: (a -> Bool) -> a -> Either a a Source
guard
Natural isomorphisms
 swap :: (a, b) -> (b, a) Source
swap
 assocr :: ((a, b), c) -> (a, (b, c)) Source
assoc right
 assocl :: (a, (b, c)) -> ((a, b), c) Source
assoc left
 distr :: (a, Either b c) -> Either (a, b) (a, c) Source
dist right
 undistr :: Either (a, b) (a, c) -> (a, Either b c) Source
undist right
 flatr :: (a, (b, c)) -> (a, b, c) Source
flat right
 flatl :: ((a, b), c) -> (a, b, c) Source
flat left
 unflatr :: (a, b, c) -> (a, (b, c)) Source
unflat right
 unflatl :: (a, b, c) -> ((a, b), c) Source
unflat left
 pwnil :: a -> (a, ()) Source
pair with nil
 coswap :: Either a b -> Either b a Source
coswap
 coassocr :: Either (Either a b) c -> Either a (Either b c) Source
coassoc right
More funtions
 maybe2either :: Maybe a -> Either () a Source
maybe 2 Either
 either2maybe :: Either () a -> Maybe a Source
either 2 maybe
 e2m :: Either () a -> Maybe a Source
Binding to either2maybe
 m2e :: Maybe a -> Either () a Source
Binding to maybe2either
Algebras and Co-Algebras
 outL :: [a] -> Maybe (a, [a]) Source
out
 cataL :: (Maybe (a, c) -> c) -> [a] -> c Source
catamorphism
 inL :: Maybe (a, [a]) -> [a] Source
in
 anaL :: (c -> Maybe (a, c)) -> c -> [a] Source
anamorphism
 hyloL :: (Maybe (c, b) -> b) -> (a -> Maybe (c, a)) -> a -> b Source
hylomorphism
 mapL :: (a -> b) -> [a] -> [b] Source
mapping
 concatL :: [[a]] -> [a] Source
concat
 reverseL :: [a] -> [a] Source
reverse
Algebras and Co-Algebras
 outL1 :: [a] -> Maybe (Either a (a, [a])) Source
out
 cataL1 :: (Maybe (Either a (a, c)) -> c) -> [a] -> c Source
catamorphism
 inL1 :: Maybe (Either a (a, [a])) -> [a] Source
in
 anaL1 :: (c -> Maybe (Either a (a, c))) -> c -> [a] Source
anamorphism
 hyloL1 :: (Maybe (Either d (c, b)) -> b) -> (a -> Maybe (Either d (c, a))) -> a -> b Source
hylomorphism