package melange

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Belt.HashMap

The top level provides generic mutable hash map operations.

It also has two specialized inner modules Belt.HashMap.Int and Belt.HashMap.String

module N : sig ... end
module C : sig ... end
module A : sig ... end

Belt.Array Utililites for Array functions

type ('a, 'id) eq = ('a -> 'a -> bool) Js.Fn.arity2
type ('a, 'id) hash = ('a -> int) Js.Fn.arity1
type ('a, 'id) id = (module Belt__.Belt_Id.Hashable with type identity = 'id and type t = 'a)
type ('a, 'b, 'id) t = (('a, 'id) hash, ('a, 'id) eq, 'a, 'b) N.t
val clear : ('a, 'b, 'c) C.container -> unit
val size : ('a, 'b, 'c) C.container -> int
val forEach : ('a, 'b, 'c, 'd) N.t -> ('c -> 'd -> 'e) -> unit
val forEachU : ('a, 'b, 'c, 'd) N.t -> ('c -> 'd -> 'e) Js.Fn.arity2 -> unit
val reduce : ('a, 'b, 'c, 'd) N.t -> 'e -> ('e -> 'c -> 'd -> 'e) -> 'e
val reduceU : ('a, 'b, 'c, 'd) N.t -> 'e -> ('e -> 'c -> 'd -> 'e) Js.Fn.arity3 -> 'e
val logStats : ('a, 'b, 'c, 'd) N.t -> unit
val keepMapInPlaceU : ('a, 'b, 'c, 'd) N.t -> ('c -> 'd -> 'd option) Js.Fn.arity2 -> unit
val keepMapInPlace : ('a, 'b, 'c, 'd) N.t -> ('c -> 'd -> 'd option) -> unit
val toArray : ('a, 'b, 'c, 'd) N.t -> ('c * 'd) array
val copy : ('a, 'b, 'c, 'd) N.t -> ('a, 'b, 'c, 'd) N.t
val keysToArray : ('a, 'b, 'c, 'd) N.t -> 'c array
val valuesToArray : ('a, 'b, 'c, 'd) N.t -> 'd array
val getBucketHistogram : ('a, 'b, 'c, 'd) N.t -> int array
val isEmpty : ('a, 'b, 'c) C.container -> bool
val copyBucketReHash : hash:('a -> int) Js.Fn.arity1 -> h_buckets:('b, 'c) N.bucket C.opt A.t -> ndata_tail:('d, 'e) N.bucket C.opt A.t -> ('b, 'c) N.bucket C.opt -> unit
val resize : hash:('a -> int) Js.Fn.arity1 -> ('b, 'c, ('a, 'd) N.bucket) C.container -> unit
val replaceInBucket : eq:('a -> 'b -> bool) Js.Fn.arity2 -> 'c -> 'd -> ('e, 'f) N.bucket -> bool
val set0 : ('a, 'b, ('c, 'd) N.bucket) C.container -> 'e -> 'f -> eq:('g -> 'h -> bool) Js.Fn.arity2 -> hash:('i -> int) Js.Fn.arity1 -> unit
val set : (('a -> int) Js.Fn.arity1, ('c -> 'c -> bool) Js.Fn.arity2, ('e, 'f) N.bucket) C.container -> 'g -> 'h -> unit
val removeInBucket : ('a, 'b, 'c) C.container -> 'd -> 'e -> 'f -> ('g, 'h) N.bucket -> ('i, 'j) N.bucket C.opt -> eq:('k -> 'l -> bool) Js.Fn.arity2 -> unit
val remove : (('a -> int) Js.Fn.arity1, ('c -> 'c -> bool) Js.Fn.arity2, ('e, 'f) N.bucket) C.container -> 'g -> unit
val getAux : eq:('a -> 'b -> bool) Js.Fn.arity2 -> 'c -> ('d, 'e) N.bucket C.opt -> 'f option
val get : (('a -> int) Js.Fn.arity1, ('c -> 'c -> bool) Js.Fn.arity2, ('e, 'f) N.bucket) C.container -> 'g -> 'h option
val memInBucket : 'a -> ('b, 'c) N.bucket -> eq:('d -> 'e -> bool) Js.Fn.arity2 -> bool
val has : (('a -> int) Js.Fn.arity1, ('c -> 'c -> bool) Js.Fn.arity2, ('e, 'f) N.bucket) C.container -> 'g -> bool
val make : hintSize:int -> id:('key, 'identity) id -> (('key0 -> int) Js.Fn.arity1, ('key0 -> 'key0 -> bool) Js.Fn.arity2, 'a) C.container
val fromArray : ('a * 'b) A.t -> id:('a0, 'identity) id -> (('a1 -> int) Js.Fn.arity1, ('a1 -> 'a1 -> bool) Js.Fn.arity2, ('a, 'c) N.bucket) C.container
val mergeMany : (('a -> int) Js.Fn.arity1, ('c -> 'c -> bool) Js.Fn.arity2, ('e, 'f) N.bucket) C.container -> ('g * 'h) A.t -> unit
module Int : sig ... end
module String : sig ... end

Adapted by Hongbo Zhang, Authors of ReScript 2017

OCaml

Innovation. Community. Security.