RingBuffer Module
Creates a mutable buffer of fixed capacity, adds items by overwriting the oldest item when full, and reads the items from oldest to newest.
Functions and values
| Function or value |
Description
|
|
Add (overwrites oldest when full)
|
|
Clear without reallocating
|
Full Usage:
RingBuffer.create capacity
Parameters:
int
Returns: RingBuffer<'T>
Type parameters: 'T |
|
|
Apply f for each element, oldest -> newest
|
Full Usage:
RingBuffer.map f rb
Parameters:
'T -> 'U
rb : RingBuffer<'T>
Returns: 'U[]
Type parameters: 'T, 'U |
|
|
|
|
GenPRES