Types.CollectionA generic interface to access a readonly sequential collection of unique keyed items.
type 't t = 't t_collectionThe number of items in the collection.
val get_size : 't t -> unit -> floatIterate over all keys in the collection.
The number of items in the collection.
val get_keys : 't t -> unit -> string arrayGet an item by its key.
Iterate over all keys in the collection.
val get_item : 't t -> string -> 't optionGet an item by the index of its key.
Get an item by its key.
val at : 't t -> float -> 't optionGet the key that comes before the given key in the collection.
Get an item by the index of its key.
val get_key_before : 't t -> string -> string optionGet the key that comes after the given key in the collection.
Get the key that comes before the given key in the collection.
val get_key_after : 't t -> string -> string optionGet the first key in the collection.
Get the key that comes after the given key in the collection.
val get_first_key : 't t -> unit -> string optionGet the last key in the collection.
Get the first key in the collection.
val get_last_key : 't t -> unit -> string optionGet the last key in the collection.
val make :
get_size:(unit -> float) ->
get_keys:(unit -> string array) ->
get_item:(string -> 't option) ->
at:(float -> 't option) ->
get_key_before:(string -> string option) ->
get_key_after:(string -> string option) ->
get_first_key:(unit -> string option) ->
get_last_key:(unit -> string option) ->
unit ->
't t