Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This internal module is exposed only for testing and benchmarking. You don't need to import it.
Synopsis
- data StateQueue a
- empty :: StateQueue a
- insert :: a -> StateQueue a -> StateQueue a
- insertUnique :: Int -> a -> StateQueue a -> StateQueue a
- getElements :: StateQueue a -> [a]
Documentation
data StateQueue a Source #
StateQueue
is a data structure that can efficiently insert elements
(preserving their order)
and check whether an element with the given Int
key is already in the queue.
Instances
empty :: StateQueue a Source #
The empty state queue
insert :: a -> StateQueue a -> StateQueue a Source #
Insert an element in the state queue without a key.
Since insert
doesn't take a key, it won't affect any insertUnique
.
:: Int | key |
-> a | |
-> StateQueue a | |
-> StateQueue a |
Insert an element in the state queue, unless there is already an element with the same key
getElements :: StateQueue a -> [a] Source #
Get the list of all elements