rhine-0.8.0.0: Functional Reactive Programming with type-level clocks
Safe HaskellNone
LanguageHaskell2010

FRP.Rhine.ResamplingBuffer.LIFO

Description

Different implementations of LIFO buffers.

Synopsis

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.

lifoWatch :: Monad m => ResamplingBuffer m cl1 cl2 a (Maybe a, Int) Source #

An unbounded LIFO buffer that also returns its current size.