package stdune
package stdune
-
dune_filesystem_stubs
-
stdune
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Hashtable with a simple polymorphic type, but without the polymorphic equality.
This module re-wraps the hashtable implementation provided by Hashtbl.Make
under a different interface: we just have a single type ('k, 'v) t
, similar to a polymorphic hashtable.
This means that if you want a hash table generic over the type of keys, you don't have to put your type inside a functor.
Unlike the polymorphic hashtable (('k, 'v) Hashtbl.t
), this does not use polymorphic hash and polymorphic equality, so this module does respect abstraction boundaries.
module type Key = sig ... end
val find : ('k, 'v) t -> 'k -> 'v option
val find_exn : ('k, 'v) t -> 'k -> 'v
val set : ('k, 'v) t -> 'k -> 'v -> unit
val add_exn : ('k, 'v) t -> 'k -> 'v -> unit
val clear : ('k, 'v) t -> unit
val mem : ('k, _) t -> 'k -> bool
val keys : ('k, _) t -> 'k list
val foldi : ('k, 'v) t -> init:'init -> f:('k -> 'v -> 'init -> 'init) -> 'init
val fold : (_, 'v) t -> init:'init -> f:('v -> 'init -> 'init) -> 'init
val find_or_add : ('k, 'v) t -> 'k -> f:('k -> 'v) -> 'v
val remove : ('k, _) t -> 'k -> unit
val iter : (_, 'v) t -> f:('v -> unit) -> unit
val filteri_inplace : ('a, 'b) t -> f:(key:'a -> data:'b -> bool) -> unit
val length : (_, _) t -> int
val values : (_, 'a) t -> 'a list
module Multi : sig ... end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>