package melange

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

This module is Belt.MutableSet specialized with key type to be a primitive type. It is more efficient in general, the API is the same with Belt_MutableSet except its key type is fixed, and identity is not needed(using the built-in one)

module I : sig ... end
module S : sig ... end

This is a specialized module for Belt.SortArray, the docs in that module also applies here, except the comparator is fixed and inlined

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

Belt.Array Utililites for Array functions

type value = I.value

The type of the set elements.

type t = {
  1. mutable data : I.t;
}

The type of sets.

val remove0 : value N.node -> value -> value N.t
val remove : t -> value -> unit
val removeMany0 : value N.node -> value A.t -> int -> int -> value N.node option
val removeMany : t -> value A.t -> unit
val removeCheck0 : value N.node -> value -> bool Js__Melange_mini_stdlib.ref -> value N.t
val removeCheck : t -> value -> bool
val addCheck0 : value N.t -> value -> bool Js__Melange_mini_stdlib.ref -> value N.t
val addCheck : t -> value -> bool
val add : t -> I.value -> unit
val addArrayMutate : I.value I.N.t -> I.value A.t -> I.value I.N.t
val mergeMany : t -> I.value A.t -> unit
val make : unit -> t
val isEmpty : t -> bool
val minimum : t -> I.value option
val minUndefined : t -> I.value Js.undefined
val maximum : t -> I.value option
val maxUndefined : t -> I.value Js.undefined
val forEachU : t -> (I.value -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (I.value -> unit) -> unit
val reduceU : t -> 'a -> ('a -> I.value -> 'a) Js.Fn.arity2 -> 'a
val reduce : t -> 'a -> ('a -> I.value -> 'a) -> 'a
val everyU : t -> (I.value -> bool) Js.Fn.arity1 -> bool
val every : t -> (I.value -> bool) -> bool
val someU : t -> (I.value -> bool) Js.Fn.arity1 -> bool
val some : t -> (I.value -> bool) -> bool
val size : t -> int
val toList : t -> I.value list
val toArray : t -> I.value array
val fromSortedArrayUnsafe : I.value array -> t
val checkInvariantInternal : t -> unit
val fromArray : I.value array -> t
val cmp : t -> t -> int
val eq : t -> t -> bool
val get : t -> I.value -> I.value option
val getUndefined : t -> I.value -> I.value Js.Undefined.t
val getExn : t -> I.value -> I.value
val split : t -> S.element -> (t * t) * bool
val keepU : t -> (I.value -> bool) Js.Fn.arity1 -> t
val keep : t -> (I.value -> bool) -> t
val partitionU : t -> (I.value -> bool) Js.Fn.arity1 -> t * t
val partition : t -> (I.value -> bool) -> t * t
val subset : t -> t -> bool
val intersect : t -> t -> t
val diff : t -> t -> t
val union : t -> t -> t
val has : t -> I.value -> bool
val copy : t -> t
OCaml

Innovation. Community. Security.