O(n).
Modify each element of the queue.
Moduledeque-0.4.4.4Haskell2010
Deque.Strict.Reader
Strict Deque API lifted to a Reader monad, "mtl"-style.
- 22 values
- Packagedeque-0.4.4.4
- Exports22
- LanguageHaskell2010
- LicenceMIT
- SourceReader.hs
O(n).
Add elements to the begginning.
O(n).
Add elements to the ending.
O(1).
Add element in the beginning.
O(1).
Add element in the ending.
O(1).
Reverse the deque.
O(1), occasionally O(n).
Move the first element to the end.
O(1), occasionally O(n).
Move the last element to the beginning.
O(n).
Leave only the elements satisfying the predicate.
O(n).
Leave only the specified amount of first elements.
O(n).
Drop the specified amount of first elements.
O(n).
Leave only the first elements satisfying the predicate.
O(n).
Drop the first elements satisfying the predicate.
O(1), occasionally O(n).
Get the first element and deque without it if it's not empty.
O(1), occasionally O(n).
Get the last element and deque without it if it's not empty.
O(1).
Check whether deque is empty.
O(1).
Check whether deque is empty.
O(1), occasionally O(n).
Get the first element if deque is not empty.
O(1), occasionally O(n).
Get the last element if deque is not empty.
O(1), occasionally O(n).
Keep all elements but the first one.
O(1), occasionally O(n).
Keep all elements but the last one.