Module Fsq.Make
Make(K) is the fixed-size search queue with keys K.t.
Parameters
Signature
val empty : int -> tempty max_sizeis the search queue withmax_sizethat contains no elements.
val size : t -> intsize tis the number of distinct elements int.
val push : k -> t -> tpush k tistwithkadded to the queue. If the queue reachedmax_size, the oldest element ispopped from the queue. Ifkalready exists int, no operation is performed
val fold : (k -> int -> 'a -> 'a) -> 'a -> t -> 'afold f z tisf k0 p0 (f k1 p1 ... (f kn pn z)). Elements are folded over in insertion order where p is the index of the element starting from 0.