Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Different implementations of LIFO buffers.
Synopsis
- lifoUnbounded :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a)
- lifoBounded :: Monad m => Int -> ResamplingBuffer m cl1 cl2 a (Maybe a)
- lifoWatch :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a, Int)
LIFO (last-in-first-out) buffers
lifoUnbounded :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a) Source #
An unbounded LIFO buffer.
If the buffer is empty, it will return Nothing
.
lifoBounded :: Monad m => Int -> ResamplingBuffer m cl1 cl2 a (Maybe a) Source #
A bounded LIFO buffer that forgets the oldest values when the size is above a given threshold.
If the buffer is empty, it will return Nothing
.