UMinho Haskell Libraries (1.0)ContentsIndex
Data.Bag
Portability experimental
Stability experimental
Maintainer Joost Visser
Contents
Bags
Description
Data type of bags.
Synopsis
newtype Bag a = Bag {
fm :: (FiniteMap a Int)
}
addToBag :: Ord a => Bag a -> a -> Bag a
emptyBag :: Bag a
listToBag :: Ord a => [a] -> Bag a
unionBags :: Ord a => [Bag a] -> Bag a
unionBag :: Ord a => Bag a -> Bag a -> Bag a
lookupBag :: Ord a => Bag a -> a -> Int
Bags
newtype Bag a
The type of bags.
Constructors
Bag
fm :: (FiniteMap a Int)
Instances
??? a => Eq (Bag a)
addToBag :: Ord a => Bag a -> a -> Bag a
Add an element to a bag.
emptyBag :: Bag a
Empty bag.
listToBag :: Ord a => [a] -> Bag a
Put all elements from a list into a bag.
unionBags :: Ord a => [Bag a] -> Bag a
Create the union of a list of bags.
unionBag :: Ord a => Bag a -> Bag a -> Bag a
Create the union of two bags.
lookupBag :: Ord a => Bag a -> a -> Int
Produced by Haddock version 0.6