CircularBuffer v0.2.0 CircularBuffer View Source
Circular Buffer built around erlang's queue module.
When creating a circular buffer you must specify the max size:
cb = CircularBuffer.new(10)
Link to this section Summary
Functions
Checks the buffer to see if its empty
Inserts a new item into the next location of the circular buffer
Creates a new circular buffer with a given size.
Returns the newest element in the buffer
Returns the oldest element in the buffer
Converts a circular buffer to a list. The list is ordered from oldest to newest elements based on their insertion order.
Link to this section Functions
Checks the buffer to see if its empty
Inserts a new item into the next location of the circular buffer
Creates a new circular buffer with a given size.
Returns the newest element in the buffer
Returns the oldest element in the buffer
Converts a circular buffer to a list. The list is ordered from oldest to newest elements based on their insertion order.