Module HashSet.String
Specalized when key type is string, more efficient than the generic type
This module is Belt.HashSet specialized with key type to be a primitive type.
It is more efficient in general, the API is the same with Belt.HashSet except its key type is fixed, and identity is not needed(using the built-in one)
See Belt.HashSet
ocaml
type key = stringreasonml
type key = string;ocaml
type treasonml
type t;ocaml
val make : hintSize:int -> treasonml
let make: hintSize:int => t;ocaml
val clear : t -> unitreasonml
let clear: t => unit;ocaml
val isEmpty : t -> boolreasonml
let isEmpty: t => bool;ocaml
val add : t -> key -> unitreasonml
let add: t => key => unit;ocaml
val copy : t -> treasonml
let copy: t => t;ocaml
val has : t -> key -> boolreasonml
let has: t => key => bool;ocaml
val remove : t -> key -> unitreasonml
let remove: t => key => unit;ocaml
val forEachU : t -> (key -> unit) Js.Fn.arity1 -> unitreasonml
let forEachU: t => Js.Fn.arity1((key => unit)) => unit;ocaml
val forEach : t -> (key -> unit) -> unitreasonml
let forEach: t => (key => unit) => unit;ocaml
val reduceU : t -> 'c -> ('c -> key -> 'c) Js.Fn.arity2 -> 'creasonml
let reduceU: t => 'c => Js.Fn.arity2(('c => key => 'c)) => 'c;ocaml
val reduce : t -> 'c -> ('c -> key -> 'c) -> 'creasonml
let reduce: t => 'c => ('c => key => 'c) => 'c;ocaml
val size : t -> intreasonml
let size: t => int;ocaml
val logStats : t -> unitreasonml
let logStats: t => unit;ocaml
val toArray : t -> key arrayreasonml
let toArray: t => array(key);ocaml
val fromArray : key array -> treasonml
let fromArray: array(key) => t;ocaml
val mergeMany : t -> key array -> unitreasonml
let mergeMany: t => array(key) => unit;ocaml
val getBucketHistogram : t -> int arrayreasonml
let getBucketHistogram: t => array(int);