- data Ord a => SetList a = SetList {
- listCounter :: Int
- listSet :: Set a
- setListNew :: Ord a => SetList a
- setListGetCounter :: Ord a => SetList a -> Int
- setListGetNewCounter :: Ord a => SetList a -> (Int, SetList a)
- setListSetCounter :: Ord a => SetList a -> Int -> SetList a
- setListIncCounter :: Ord a => SetList a -> SetList a
- setListAddNode :: Ord a => SetList a -> a -> SetList a
- setListRemoveNode :: Ord a => SetList a -> a -> SetList a
- setListRemoveOthersNode :: Ord a => SetList a -> a -> SetList a
- setListGetNode :: Ord a => SetList a -> (a -> Bool) -> Maybe a
- setListGetNodeM :: (Ord a, Monad m) => SetList a -> (a -> m Bool) -> m (Maybe a)
- setListEmptySet :: Ord a => SetList a -> SetList a
- setListGetList :: Ord a => SetList a -> [a]
Documentation
setListNew :: Ord a => SetList aSource
New SetList.
setListGetCounter :: Ord a => SetList a -> IntSource
Get counter for SetList.
setListGetNewCounter :: Ord a => SetList a -> (Int, SetList a)Source
Increase counter and then get new counter. Return new setList and new id.
setListIncCounter :: Ord a => SetList a -> SetList aSource
Increase counter.
setListAddNode :: Ord a => SetList a -> a -> SetList aSource
Add new node in SetList.
setListRemoveNode :: Ord a => SetList a -> a -> SetList aSource
Remove node from SetList.
setListRemoveOthersNode :: Ord a => SetList a -> a -> SetList aSource
Remove others node except current one.
setListGetNodeM :: (Ord a, Monad m) => SetList a -> (a -> m Bool) -> m (Maybe a)Source
Like setListGetNode
, but use Monad wrap search condition.
setListEmptySet :: Ord a => SetList a -> SetList aSource
Empty List, but keep counter.
setListGetList :: Ord a => SetList a -> [a]Source
Convert from SetList to list.