API / Belt / Hashset / String

String

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

key

RESCRIPT
type key = string

t

RESCRIPT
type t

make

RESCRIPT
let make: (~hintSize: int) => t

clear

RESCRIPT
let clear: t => unit

isEmpty

RESCRIPT
let isEmpty: t => bool

add

RESCRIPT
let add: (t, key) => unit

copy

RESCRIPT
let copy: t => t

has

RESCRIPT
let has: (t, key) => bool

remove

RESCRIPT
let remove: (t, key) => unit

forEachU

RESCRIPT
let forEachU: (t, key => unit) => unit

forEach

RESCRIPT
let forEach: (t, key => unit) => unit

reduceU

RESCRIPT
let reduceU: (t, 'c, ('c, key) => 'c) => 'c

reduce

RESCRIPT
let reduce: (t, 'c, ('c, key) => 'c) => 'c

size

RESCRIPT
let size: t => int

logStats

RESCRIPT
let logStats: t => unit

toArray

RESCRIPT
let toArray: t => array<key>

fromArray

RESCRIPT
let fromArray: array<key> => t

mergeMany

RESCRIPT
let mergeMany: (t, array<key>) => unit

getBucketHistogram

RESCRIPT
let getBucketHistogram: t => array<int>