You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valforEachU: 'at -> (key -> 'a -> unit [@bs]) -> unit
95
+
(** ```res sig
96
+
let forEachU: (t<'a>, (. key, 'a) => unit) => unit
97
+
```
98
+
*)
99
+
50
100
valforEach: 'at -> (key -> 'a -> unit) -> unit
51
-
(** `forEach m f` applies `f` to all bindings in map `m`.
52
-
`f` receives the key as first argument, and the associated value
53
-
as second argument.
54
-
The application order of `f` is in increasing order. *)
101
+
(** ```res sig
102
+
let forEach: (t<'a>, (key, 'a) => unit) => unit
103
+
```
104
+
105
+
`forEach(m, f)` applies `f` to all bindings in map `m`. `f` receives the key as first argument, and the associated value as second argument. The application order of `f` is in increasing order.
`reduce(m, a, f), computes`(f(kN, dN) ... (f(k1, d1, a))...)`, where`k1 ... kN`are the keys of all bindings in`m`(in increasing order), and`d1 ... dN` are the associated data.
let updateU: (t<'a>, key, (. option<'a>) => option<'a>) => unit
302
+
```
303
+
*)
304
+
123
305
valupdate: 'at -> key -> ('aoption -> 'aoption) -> unit
306
+
(** ```res sig
307
+
let update: (t<'a>, key, option<'a> => option<'a>) => unit
308
+
```
309
+
*)
124
310
125
311
126
312
valmapU: 'at -> ('a -> 'b [@bs]) -> 'bt
313
+
(** ```res sig
314
+
let mapU: (t<'a>, (. 'a) => 'b) => t<'b>
315
+
```
316
+
*)
317
+
127
318
valmap: 'at -> ('a -> 'b) -> 'bt
128
-
(** `map m f` returns a map with same domain as `m`, where the
129
-
associated value `a` of all bindings of `m` has been
130
-
replaced by the result of the application of `f` to `a`.
131
-
The bindings are passed to `f` in increasing order
132
-
with respect to the ordering over the type of the keys. *)
319
+
(** ```res sig
320
+
let map: (t<'a>, 'a => 'b) => t<'b>
321
+
```
322
+
323
+
`map(m, f)` returns a map with same domain as `m`, where the associated value a of all bindings of `m` has been replaced by the result of the application of `f` to `a`. The bindings are passed to `f` in increasing order with respect to the ordering over the type of the keys.
0 commit comments