hgeometry-combinatorial-0.12.0.2: Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.List.Set

Description

 
Synopsis

Documentation

data Set a Source #

A Set of a's, implemented using a simple list. The only advantage of this implementation over Set from containers is that most operations require only 'Eq a' rather than 'Ord a'.

Instances

Instances details
Functor Set Source # 
Instance details

Defined in Data.List.Set

Methods

fmap :: (a -> b) -> Set a -> Set b #

(<$) :: a -> Set b -> Set a #

Foldable Set Source # 
Instance details

Defined in Data.List.Set

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Traversable Set Source # 
Instance details

Defined in Data.List.Set

Methods

traverse :: Applicative f => (a -> f b) -> Set a -> f (Set b) #

sequenceA :: Applicative f => Set (f a) -> f (Set a) #

mapM :: Monad m => (a -> m b) -> Set a -> m (Set b) #

sequence :: Monad m => Set (m a) -> m (Set a) #

Eq a => Eq (Set a) Source # 
Instance details

Defined in Data.List.Set

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Read a => Read (Set a) Source # 
Instance details

Defined in Data.List.Set

Show a => Show (Set a) Source # 
Instance details

Defined in Data.List.Set

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Eq a => Semigroup (Set a) Source # 
Instance details

Defined in Data.List.Set

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Eq a => Monoid (Set a) Source # 
Instance details

Defined in Data.List.Set

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

singleton :: a -> Set a Source #

Creates a singleton set.

insert :: Eq a => a -> Set a -> Set a Source #

\(O(n)\) Inserts an element in the set

delete :: Eq a => a -> Set a -> Set a Source #

\(O(n)\) Deletes an element from the set

union :: Eq a => Set a -> Set a -> Set a Source #

\(O(n^2)\) Computes the union of two sets

intersection :: Eq a => Set a -> Set a -> Set a Source #

\(O(n^2)\) Computes the intersection of two sets

difference :: Eq a => Set a -> Set a -> Set a Source #

\(O(n^2)\) Computes the difference of two sets

fromList :: Eq a => [a] -> Set a Source #

\( O(n^2) \) Create a set from a finite list of elements.

insertAll :: Eq a => [a] -> Set a -> Set a Source #

\( O(n^2) \) Insert an element in a set.