package server-reason-react

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

Belt.Set

The top level provides generic immutable set operations.

It also has three specialized inner modules Belt.Set.Int, Belt.Set.String and

Belt.Set.Dict: This module separates data from function which is more verbose but slightly more efficient

module Int = Belt_SetInt
module String = Belt_SetString
module Dict : sig ... end
type ('value, 'id) id = (module Belt__.Belt_Id.Comparable with type identity = 'id and type t = 'value)
type ('value, 'id) cmp = 'value -> 'value -> int
type ('value, 'id) t = {
  1. cmp : ('value, 'id) cmp;
  2. data : ('value, 'id) Dict.t;
}
val fromArray : 'value array -> id:('value0, 'identity) id -> ('value, 'a) t
val remove : ('a, 'b) t -> 'c -> ('a, 'b) t
val add : ('a, 'b) t -> 'c -> ('a, 'b) t
val mergeMany : ('a, 'b) t -> 'c Dict.A.t -> ('d, 'e) t
val removeMany : ('a, 'b) t -> 'c Dict.A.t -> ('d, 'e) t
val union : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val intersect : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val diff : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val subset : ('a, 'b) t -> ('c, 'd) t -> bool
val split : ('a, 'b) t -> 'c -> (('d, 'e) t * ('f, 'g) t) * bool
val make : id:('value, 'identity) id -> ('value0, 'a) t
val isEmpty : ('a, 'b) t -> bool
val cmp : ('a, 'b) t -> ('c, 'd) t -> int
val eq : ('a, 'b) t -> ('c, 'd) t -> bool
val forEachU : ('a, 'b) t -> ('c -> unit) -> unit
val forEach : ('a, 'b) t -> ('c -> unit) -> unit
val reduceU : ('a, 'b) t -> 'c -> ('d -> 'e -> 'd) -> 'f
val reduce : ('a, 'b) t -> 'c -> ('d -> 'e -> 'f) -> 'g
val everyU : ('a, 'b) t -> ('c -> bool) -> bool
val every : ('a, 'b) t -> ('c -> bool) -> bool
val someU : ('a, 'b) t -> ('c -> bool) -> bool
val some : ('a, 'b) t -> ('c -> bool) -> bool
val keepU : ('a, 'b) t -> ('c -> bool) -> ('d, 'e) t
val keep : ('a, 'b) t -> ('c -> bool) -> ('a, 'd) t
val partitionU : ('a, 'b) t -> ('c -> bool) -> ('d, 'e) t * ('f, 'g) t
val partition : ('a, 'b) t -> ('c -> bool) -> ('a, 'd) t * ('a, 'e) t
val size : ('a, 'b) t -> int
val toList : ('a, 'b) t -> 'c list
val toArray : ('a, 'b) t -> 'c array
val minimum : ('a, 'b) t -> 'c option
val minUndefined : ('a, 'b) t -> 'c option
val maximum : ('a, 'b) t -> 'c option
val maxUndefined : ('a, 'b) t -> 'c option
val get : ('a, 'b) t -> 'c -> 'd option
val getUndefined : ('a, 'b) t -> 'c -> 'd option
val getExn : ('a, 'b) t -> 'c -> 'd
val has : ('a, 'b) t -> 'c -> bool
val fromSortedArrayUnsafe : 'value Dict.N.A.t -> id:('value0, 'identity) id -> ('value, 'a) t
val getData : ('a, 'b) t -> 'a Dict.N.t
val getId : ('value, 'identity) t -> ('value0, 'identity0) id
val packIdData : id:('value, 'identity) id -> data:'value0 Dict.N.t -> ('value0, 'a) t
val checkInvariantInternal : ('a, 'b) t -> unit
OCaml

Innovation. Community. Security.