board-games-0.1.0.6: Three games for inclusion in a web server

Game.Mastermind.CodeSet.Union

Synopsis

# Documentation

newtype T a Source #

Cons [[a,b,c,d], [e,f,g,h]] expresses a x b x c x d union e x f x g x h, where x denotes the set product.

Constructors

 Cons [[Set a]]

Instances

 Source # Methodsunion :: Ord a => T a -> T a -> T a Source #intersection :: Ord a => T a -> T a -> T a Source #unit :: T a Source #leftNonEmptyProduct :: Set a -> T a -> T a Source #flatten :: Ord a => T a -> [[a]] Source #symbols :: Ord a => T a -> Set a Source #null :: T a -> Bool Source #size :: T a -> Integer Source #select :: T a -> Integer -> [a] Source #compress :: Ord a => T a -> T a Source # (Ord a, Show a) => Show (T a) Source # MethodsshowsPrec :: Int -> T a -> ShowS #show :: T a -> String #showList :: [T a] -> ShowS #

toLists :: Ord a => T a -> [[[a]]] Source #

fromLists :: Ord a => [[[a]]] -> T a Source #

flatten :: Ord a => T a -> [[a]] Source #

symbols :: Ord a => T a -> Set a Source #

cube :: Int -> Set a -> T a Source #

select :: T a -> Integer -> [a] Source #

union :: T a -> T a -> T a Source #

We could try to merge set products. I'll first want to see, whether this is needed in a relevant number of cases.

intersection :: Ord a => T a -> T a -> T a Source #

member :: Ord a => [a] -> T a -> Bool Source #

normalize :: T a -> T a Source #

Remove empty set products.

disjointProduct :: Ord a => [Set a] -> [Set a] -> Bool Source #

overlappingPairs :: Ord a => T a -> [([Set a], [Set a])] Source #

for debugging: list all pairs of products, that overlap

overlapping :: Ord a => T a -> [([Set a], [[Set a]])] Source #

for debugging: list all subsets, that are contained in more than one product