Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

This internal module is exposed only for testing and benchmarking. You don't need to import it.

- 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.

Foldable StateQueue Source # | |

Eq a => Eq (StateQueue a) Source # | |

Show a => Show (StateQueue a) Source # | |

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