module Index:Functions that operate on thesig
..end
i
th element of a list.
While it is sometimes necessary to perform these
operations on lists (hence their inclusion here), the
functions were moved to an inner module to prevent
their overuse: all functions work in O(n) time. You
might prefer to use Array
or DynArray
for constant
time indexed element access.
val index_of : 'a BatRefList.t -> 'a -> int
Not_found
if no element was foundval index : ('a -> bool) -> 'a BatRefList.t -> int
Not_found
if no element was foundval at_index : 'a BatRefList.t -> int -> 'a
Invalid_index
if the index is outside 0 ; length-1
val set : 'a BatRefList.t -> int -> 'a -> unit
Invalid_index
if the index is outside 0 ; length-1
val remove_at : 'a BatRefList.t -> int -> unit
Invalid_index
if the index is outside 0 ; length-1