HashSetString
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).
key
REStype key = string
t
REStype t
make
RESlet make: (~hintSize: int) => t
clear
RESlet clear: t => unit
isEmpty
RESlet isEmpty: t => bool
add
RESlet add: (t, key) => unit
copy
RESlet copy: t => t
has
RESlet has: (t, key) => bool
remove
RESlet remove: (t, key) => unit
forEachU
RESlet forEachU: (t, (. key) => unit) => unit
forEach
RESlet forEach: (t, key => unit) => unit
reduceU
RESlet reduceU: (t, 'c, (. 'c, key) => 'c) => 'c
reduce
RESlet reduce: (t, 'c, ('c, key) => 'c) => 'c
size
RESlet size: t => int
logStats
RESlet logStats: t => unit
toArray
RESlet toArray: t => array<key>
fromArray
RESlet fromArray: array<key> => t
mergeMany
RESlet mergeMany: (t, array<key>) => unit
getBucketHistogram
RESlet getBucketHistogram: t => array<int>