Skip to content

Commit a3497c0

Browse files
authored
Merge pull request rescript-lang#421 from namenu/SetDict.has
Correct `Belt.Set.Dict.has` example
2 parents 12331d2 + 017b069 commit a3497c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/docs/manual/latest/api/belt/set-dict.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<Intro>
44

5-
This module separates identity from data, it is a bit more verbose but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation
5+
This module separates identity from data. It is a bit more verbose but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation.
66

77
</Intro>
88

@@ -88,7 +88,7 @@ Belt.Set.Dict.isEmpty(notEmpty) /* false */
8888
let has: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => bool
8989
```
9090

91-
Checks if element exists in set.
91+
Checks if an element exists in the set.
9292

9393
```res example
9494
module IntCmp = Belt.Id.MakeComparable({
@@ -98,8 +98,8 @@ module IntCmp = Belt.Id.MakeComparable({
9898
9999
let set = Belt.Set.Dict.fromArray([1, 4, 2, 5], ~cmp=IntCmp.cmp)
100100
101-
set->Belt.Set.Dict.has(3) /* false */
102-
set->Belt.Set.Dict.has(1) /* true */
101+
set->Belt.Set.Dict.has(3, ~cmp=IntCmp.cmp) /* false */
102+
set->Belt.Set.Dict.has(1, ~cmp=IntCmp.cmp) /* true */
103103
```
104104

105105
## add

0 commit comments

Comments
 (0)