Portability | portable |
---|---|

Stability | experimental |

Maintainer | leon at melding-monads dot com |

# Documentation

class Monad q => MonadQueue e q | q -> e whereSource

Enqueue an element to a queue

Dequeue an element, returns `Nothing`

if the queue is empty.

deQs :: Integral maxlen => maxlen -> q [e]Source

Dequeue up to `maxlen`

elements.

Examines the front element of the queue without removing it.

peekQs :: Integral maxlen => maxlen -> q [e]Source

Examines up to `maxlen`

elements of the queue without removing them.

peekQn :: Integral index => index -> q (Maybe e)Source

Examines the element currently at position `index`

, indexing starts at `0`

.

lenQ :: Integral len => q lenSource

Returns the current length of the queue

MonadQueue e (Q e) | |

MonadQueue e (Q w e) |