Copyright | (c) Leon P Smith 2009 |
---|---|
License | BSD3 |
Maintainer | leon at melding-monads dot com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Documentation
class Monad q => MonadQueue e q | q -> e where Source
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 len Source
Returns the current length of the queue
MonadQueue e (Q e) Source | |
MonadQueue e (Q w e) Source |