23
23
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24
24
25
25
/***
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)
29
29
30
- **See** [`Belt.Set`]()
30
+ **See** [`Belt.Set`]()
31
31
*/
32
32
33
33
/** The type of the set elements. */
@@ -71,21 +71,21 @@ let diff: (t, t) => t
71
71
*/
72
72
let subset: (t, t) => bool
73
73
74
- /**
74
+ /**
75
75
Total ordering between sets. Can be used as the ordering function for doing sets
76
76
of sets.
77
77
*/
78
78
let cmp: (t, t) => int
79
79
80
- /**
80
+ /**
81
81
`eq(s1, s2)` tests whether the sets `s1` and `s2` are equal, that is, contain
82
82
equal elements.
83
83
*/
84
84
let eq: (t, t) => bool
85
85
86
86
let forEachU: (t, (. value) => unit) => unit
87
87
88
- /**
88
+ /**
89
89
`forEach(s, f)` applies `f` in turn to all elements of `s`. In increasing order
90
90
*/
91
91
let forEach: (t, value => unit) => unit
@@ -97,34 +97,33 @@ let reduce: (t, 'a, ('a, value) => 'a) => 'a
97
97
98
98
let everyU: (t, (. value) => bool) => bool
99
99
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.
103
103
*/
104
104
let every: (t, value => bool) => bool
105
105
106
106
let someU: (t, (. value) => bool) => bool
107
107
108
- /**
108
+ /**
109
109
`some(p, s)` checks if at least one element of the set satisfies the predicate
110
110
`p`. Oder unspecified.
111
111
*/
112
112
let some: (t, value => bool) => bool
113
113
114
114
let keepU: (t, (. value) => bool) => t
115
115
116
- /**
116
+ /**
117
117
`keep(p, s)` returns the set of all elements in `s` that satisfy predicate `p`.
118
118
*/
119
119
let keep: (t, value => bool) => t
120
120
121
121
let partitionU: (t, (. value) => bool) => (t, t)
122
122
123
123
/**
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`.
128
127
*/
129
128
let partition: (t, value => bool) => (t, t)
130
129
@@ -150,13 +149,10 @@ let getUndefined: (t, value) => Js.undefined<value>
150
149
let getExn: (t, value) => value
151
150
152
151
/**
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`.
160
156
*/
161
157
let split: (t, value) => ((t, t), bool)
162
158
0 commit comments