Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ring buffers.
Synopsis
- data RingBuffer a
- empty :: Int -> a -> RingBuffer a
- cons :: a -> RingBuffer a -> RingBuffer a
- uncons :: RingBuffer a -> Maybe (a, RingBuffer a)
- toList :: RingBuffer a -> [a]
- length :: RingBuffer a -> Int
Documentation
data RingBuffer a Source #
Ring buffers of a size determined at initialization.
Instances
empty :: Int -> a -> RingBuffer a Source #
cons :: a -> RingBuffer a -> RingBuffer a Source #
uncons :: RingBuffer a -> Maybe (a, RingBuffer a) Source #
toList :: RingBuffer a -> [a] Source #
length :: RingBuffer a -> Int Source #