2323 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
2424
2525/***
26- This module is [`Belt.Set`]() specialized with value type to be a primitive type.
27- It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
28- and identity is not needed(using the built-in one)
26+ This module is [`Belt.Set`]() specialized with value type to be a primitive type.
27+ It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,
28+ and identity is not needed(using the built-in one)
2929
30- **See** [`Belt.Set`]()
30+ **See** [`Belt.Set`]()
3131*/
3232
3333/** The type of the set elements. */
@@ -71,21 +71,21 @@ let diff: (t, t) => t
7171*/
7272let subset : (t , t ) => bool
7373
74- /**
74+ /**
7575Total ordering between sets. Can be used as the ordering function for doing sets
7676of sets.
7777*/
7878let cmp : (t , t ) => int
7979
80- /**
80+ /**
8181`eq(s1, s2)` tests whether the sets `s1` and `s2` are equal, that is, contain
8282equal elements.
8383*/
8484let eq : (t , t ) => bool
8585
8686let forEachU : (t , (. value ) => unit ) => unit
8787
88- /**
88+ /**
8989`forEach(s, f)` applies `f` in turn to all elements of `s`. In increasing order
9090*/
9191let forEach : (t , value => unit ) => unit
@@ -97,34 +97,33 @@ let reduce: (t, 'a, ('a, value) => 'a) => 'a
9797
9898let everyU : (t , (. value ) => bool ) => bool
9999
100- /**
101- `every(p, s)` checks if all elements of the set satisfy the predicate `p`.
102- Order unspecified.
100+ /**
101+ `every(p, s)` checks if all elements of the set satisfy the predicate `p`. Order
102+ unspecified.
103103*/
104104let every : (t , value => bool ) => bool
105105
106106let someU : (t , (. value ) => bool ) => bool
107107
108- /**
108+ /**
109109`some(p, s)` checks if at least one element of the set satisfies the predicate
110110`p`. Oder unspecified.
111111*/
112112let some : (t , value => bool ) => bool
113113
114114let keepU : (t , (. value ) => bool ) => t
115115
116- /**
116+ /**
117117`keep(p, s)` returns the set of all elements in `s` that satisfy predicate `p`.
118118*/
119119let keep : (t , value => bool ) => t
120120
121121let partitionU : (t , (. value ) => bool ) => (t , t )
122122
123123/**
124- `partition(p, s)` returns a pair of sets `(s1, s2)`, where
125- `s1` is the set of all the elements of `s` that satisfy the
126- predicate `p`, and `s2` is the set of all the elements of
127- `s` that do not satisfy `p`.
124+ `partition(p, s)` returns a pair of sets `(s1, s2)`, where `s1` is the set of
125+ all the elements of `s` that satisfy the predicate `p`, and `s2` is the set of
126+ all the elements of `s` that do not satisfy `p`.
128127*/
129128let partition : (t , value => bool ) => (t , t )
130129
@@ -150,13 +149,10 @@ let getUndefined: (t, value) => Js.undefined<value>
150149let getExn : (t , value ) => value
151150
152151/**
153- `split(x, s)` returns a triple `(l, present, r)`, where
154- `l` is the set of elements of `s` that are
155- strictly less than `x`;
156- `r` is the set of elements of `s` that are
157- strictly greater than `x`;
158- `present` is `false` if `s` contains no element equal to `x`,
159- or `true` if `s` contains an element equal to `x`.
152+ `split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of
153+ elements of `s` that are strictly less than `x`;`r` is the set of elements of
154+ `s` that are strictly greater than `x`; `present` is `false` if `s` contains no
155+ element equal to `x`, or `true` if `s` contains an element equal to `x`.
160156*/
161157let split : (t , value ) => ((t , t ), bool )
162158
0 commit comments