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:('value, 'identity) id -> ('value, 'a) t
val remove : ('a, 'b) t -> 'a -> ('a, 'b) t
val add : ('a, 'b) t -> 'a -> ('a, 'b) t
val mergeMany : ('a, 'b) t -> 'a Dict.A.t -> ('a, 'c) t
val removeMany : ('a, 'b) t -> 'a Dict.A.t -> ('a, 'c) t
val union : ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t
val intersect : ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t
val diff : ('a, 'b) t -> ('a, 'c) t -> ('a, 'd) t
val subset : ('a, 'b) t -> ('a, 'c) t -> bool
val split : ('a, 'b) t -> 'a -> (('a, 'c) t * ('a, 'd) t) * bool
val make : id:('value, 'identity) id -> ('value, 'a) t
val isEmpty : ('a, 'b) t -> bool
val cmp : ('a, 'b) t -> ('a, 'c) t -> int
val eq : ('a, 'b) t -> ('a, 'c) t -> bool
val forEachU : ('a, 'b) t -> ('a -> unit) -> unit
val forEach : ('a, 'b) t -> ('a -> unit) -> unit
val reduceU : ('a, 'b) t -> 'c -> ('c -> 'a -> 'c) -> 'c
val reduce : ('a, 'b) t -> 'c -> ('c -> 'a -> 'c) -> 'c
val everyU : ('a, 'b) t -> ('a -> bool) -> bool
val every : ('a, 'b) t -> ('a -> bool) -> bool
val someU : ('a, 'b) t -> ('a -> bool) -> bool
val some : ('a, 'b) t -> ('a -> bool) -> bool
val keepU : ('a, 'b) t -> ('a -> bool) -> ('a, 'c) t
val keep : ('a, 'b) t -> ('a -> bool) -> ('a, 'c) t
val partitionU : ('a, 'b) t -> ('a -> bool) -> ('a, 'c) t * ('a, 'd) t
val partition : ('a, 'b) t -> ('a -> bool) -> ('a, 'c) t * ('a, 'd) t
val size : ('a, 'b) t -> int
val toList : ('a, 'b) t -> 'a list
val toArray : ('a, 'b) t -> 'a array
val minimum : ('a, 'b) t -> 'a option
val minUndefined : ('a, 'b) t -> 'a option
val maximum : ('a, 'b) t -> 'a option
val maxUndefined : ('a, 'b) t -> 'a option
val get : ('a, 'b) t -> 'a -> 'a option
val getUndefined : ('a, 'b) t -> 'a -> 'a option
val getExn : ('a, 'b) t -> 'a -> 'a
val has : ('a, 'b) t -> 'a -> bool
val fromSortedArrayUnsafe : 'value Dict.N.A.t -> id:('value, 'identity) id -> ('value, 'a) t
val getData : ('a, 'b) t -> 'a Dict.N.t
val getId : ('value, 'identity) t -> ('value, 'identity) id
val packIdData : id:('value, 'identity) id -> data:'value Dict.N.t -> ('value, 'a) t
val checkInvariantInternal : ('a, 'b) t -> unit
OCaml

Innovation. Community. Security.