File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 8
8
- Remove internal xxxU helper functions that are not needed anymore in uncurried mode. https://github.com/rescript-association/rescript-core/pull/191
9
9
- Rename ` Object.empty ` to ` Object.make ` for consistency.
10
10
- Add dynamic ` import ` . https://github.com/rescript-association/rescript-core/pull/178
11
- - Add ` Iterator.forEach ` and ` AsyncIterator.forEach ` helpers for iterators.
11
+ - Add ` Iterator.forEach ` and ` AsyncIterator.forEach ` helpers for iterators. https://github.com/rescript-association/rescript-core/pull/175
12
12
13
13
## 1.0.0
14
14
Original file line number Diff line number Diff line change @@ -66,11 +66,12 @@ See [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript
66
66
67
67
## Examples
68
68
```rescript
69
- await someAsyncIterator->AsyncIterator.forEach(value => {
70
- if value > 10 {
71
- Console.log("More than 10!")
69
+ await someAsyncIterator->AsyncIterator.forEach(value =>
70
+ switch value {
71
+ | Some(value) if value > 10 => Console.log("More than 10!")
72
+ | _ => ()
72
73
}
73
- } )
74
+ )
74
75
```
75
76
*/
76
77
let forEach: (t<'a>, option<'a> => unit) => promise<unit>
Original file line number Diff line number Diff line change @@ -87,11 +87,12 @@ See [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript
87
87
88
88
## Examples
89
89
```rescript
90
- someIterator->Iterator.forEach(value => {
91
- if value > 10 {
92
- Console.log("More than 10!")
90
+ someIterator->Iterator.forEach(value =>
91
+ switch value {
92
+ | Some(value) if value > 10 => Console.log("More than 10!")
93
+ | _ => ()
93
94
}
94
- } )
95
+ )
95
96
```
96
97
*/
97
98
let forEach: (t<'a>, option<'a> => unit) => unit
You can’t perform that action at this time.
0 commit comments