module Strategy: Strat.T
Module implementing the reallocation strategy
type t
The abstract type of strategies.
val default : t
Default strategy of this strategy implementation.
val grow : t -> (int -> unit) -> int -> unit
grow strat resizer new_len grows some contiguous
datastructure using strategy strat to a new (virtual) length
new_len by calling its resizer function with its new (real)
length. Be careful, the new (real) length must be larger than
the new (virtual) length, otherwise your program will crash!
val shrink : t -> (int -> unit) -> int -> int -> unit
shrink strat resizer real_len new_len (possibly) shrinks
some contiguous datastructure of length real_len depending
on its demanded new (virtual) length new_len by calling its
resizer function with its new (real) length. Be careful, the new
(real) length must be larger than the new (virtual) length,
otherwise your program will crash!