73
73
The [union s0 s3] will result in a type error, since their identity mismatch
74
74
*)
75
75
76
- (* * Specalized when key type is [int], more efficient
76
+ (* * Specalized when value type is [int], more efficient
77
77
than the gerneic type, its compare behavior is fixed using the built-in comparison
78
78
*)
79
79
module Int = Belt_SetInt
80
80
81
- (* * Specalized when key type is [string], more efficient
81
+ (* * Specalized when value type is [string], more efficient
82
82
than the gerneic type, its compare behavior is fixed using the built-in comparison
83
83
*)
84
84
module String = Belt_SetString
@@ -91,16 +91,16 @@ module String = Belt_SetString
91
91
module Dict = Belt_SetDict
92
92
93
93
94
- type ('key, 'identity) t
95
- (* * [('key , 'identity) t]
94
+ type ('value, 'identity) t
95
+ (* * [('value , 'identity) t]
96
96
97
- ['key ] is the element type
97
+ ['value ] is the element type
98
98
99
99
['identity] the identity of the collection
100
100
*)
101
101
102
102
103
- type ('key , 'id) id = ('key , 'id ) Belt_Id .comparable
103
+ type ('value , 'id) id = ('value , 'id ) Belt_Id .comparable
104
104
(* * The identity needed for making a set from scratch
105
105
*)
106
106
@@ -115,7 +115,7 @@ val make: id:('value, 'id) id -> ('value, 'id) t
115
115
*)
116
116
117
117
118
- val ofArray : 'k array -> id :('k , 'id ) id -> ('k , 'id ) t
118
+ val ofArray : 'value array -> id :('value , 'id ) id -> ('value , 'id ) t
119
119
(* * [ofArray xs ~id]
120
120
121
121
@example{[
@@ -435,7 +435,7 @@ val checkInvariantInternal: _ t -> unit
435
435
More API will be exposed by needs
436
436
*)
437
437
438
- val getData : ('k , 'id) t -> ('k , 'id) Belt_SetDict .t
438
+ val getData : ('value , 'id ) t -> ('value , 'id ) Belt_SetDict .t
439
439
(* * [getData s0]
440
440
441
441
{b Advanced usage only}
@@ -445,15 +445,15 @@ val getData: ('k,'id) t -> ('k,'id) Belt_SetDict.t
445
445
without boxing
446
446
*)
447
447
448
- val getId : ('k , 'id) t -> ('k , 'id) id
448
+ val getId : ('value , 'id ) t -> ('value , 'id ) id
449
449
(* * [getId s0]
450
450
451
451
{b Advanced usage only}
452
452
453
453
@return the identity of [s0]
454
454
*)
455
455
456
- val packIdData : id :('k , 'id ) id -> data :('k , 'id ) Belt_SetDict .t -> ('k , 'id ) t
456
+ val packIdData : id :('value , 'id ) id -> data :('value , 'id ) Belt_SetDict .t -> ('value , 'id ) t
457
457
(* * [packIdData ~id ~data]
458
458
459
459
{b Advanced usage only}
0 commit comments