Maintainer | Anders Claesson <anders.claesson@gmail.com> |
---|---|
Safe Haskell | Safe-Inferred |
License : BSD-3
Species lite
- type Spe a c = [a] -> [c]
- data BTree a
- add :: Spe a b -> Spe a c -> Spe a (Either b c)
- assemble :: [Spe a c] -> Spe a c
- mul :: Spe a b -> Spe a c -> Spe a (b, c)
- mulL :: Spe a b -> Spe a c -> Spe a (b, c)
- prod :: [Spe a b] -> Spe a [b]
- prodL :: [Spe a b] -> Spe a [b]
- power :: Spe a b -> Int -> Spe a [b]
- powerL :: Spe a b -> Int -> Spe a [b]
- compose :: Spe [a] b -> Spe a c -> Spe a (b, [c])
- o :: Spe [a] b -> Spe a c -> Spe a (b, [c])
- kDiff :: Int -> Spe (Maybe a) b -> Spe a b
- diff :: Spe (Maybe a) b -> Spe a b
- set :: Spe a [a]
- one :: Spe a [a]
- x :: Spe a [a]
- ofSize :: Spe a c -> Int -> Spe a c
- nonempty :: Spe a c -> Spe a c
- kBal :: Int -> Spe a [[a]]
- bal :: Spe a [[a]]
- par :: Spe a [[a]]
- kList :: Int -> Spe a [a]
- list :: Spe a [a]
- cyc :: Spe a [a]
- perm :: Spe a [[a]]
- kSubset :: Int -> Spe a ([a], [a])
- subset :: Spe a ([a], [a])
- btree :: Spe a (BTree a)
The species type synonym
type Spe a c = [a] -> [c]Source
A species is an endofunctor on finite sets with bijections. We approximate this by a function as defined.
Binary trees
Constructions
o :: Spe [a] b -> Spe a c -> Spe a (b, [c])Source
This is just a synonym for compose
. It is usually used infix.
Specific species
The species characteristic of the empty set; the identity with respect to species multiplication.