package alba
Alba compiler
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.4.tar.gz
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.fmlib/Fmlib/Pool/index.html
Module Fmlib.Pool
An arrayed pool of elements of a certain type.
val make_empty : unit -> 'a t
Make an empty pool.
val capacity : 'a t -> int
The current capacity of the pool.
val has : 'a t -> int -> bool
has p i
Has the pool p
an element at position i
?
val elem : 'a t -> int -> 'a
elem p i
The i
th element of the pool p
.
val find : 'a t -> int -> int
find p i
finds the next occupied element in the pool p
starting from i
. Returns i
if i
is occupied. Returns capacity if there is no next occupied element.
val iter : ('a -> unit) -> 'a t -> unit
iter f p
Iterate over all occupied elements in the pool.
val occupy : 'a t -> 'a -> int
occupy p a
occupies a place for the element a
and puts it there. If there are no free elements, then allocate space in pool. Return the position of the element a
in the pool.
val release : 'a t -> int -> unit
release p i
makes the position i
in the pool free.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>