Skip to content

Commit a36fada

Browse files
committed
format Stdlib_Result.resi with the new docstrings formatter
1 parent 500e58e commit a36fada

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

runtime/Stdlib_Result.resi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ let getOrThrow: result<'a, 'b> => 'a
8383
8484
```rescript
8585
let ok = Ok(42)
86-
Result.mapOr(ok, 0, (x) => x / 2) == 21
86+
Result.mapOr(ok, 0, x => x / 2) == 21
8787
8888
let error = Error("Invalid data")
89-
Result.mapOr(error, 0, (x) => x / 2) == 0
89+
Result.mapOr(error, 0, x => x / 2) == 0
9090
```
9191
*/
9292
let mapOr: (result<'a, 'c>, 'b, 'a => 'b) => 'b
@@ -102,7 +102,7 @@ ordinary value.
102102
## Examples
103103
104104
```rescript
105-
let f = (x) => sqrt(Int.toFloat(x))
105+
let f = x => sqrt(Int.toFloat(x))
106106
107107
Result.map(Ok(64), f) == Ok(8.0)
108108
@@ -119,8 +119,8 @@ unchanged. Function `f` takes a value of the same type as `n` and returns a
119119
## Examples
120120
121121
```rescript
122-
let recip = (x) =>
123-
if (x !== 0.0) {
122+
let recip = x =>
123+
if x !== 0.0 {
124124
Ok(1.0 /. x)
125125
} else {
126126
Error("Divide by zero")
@@ -219,11 +219,11 @@ let mod10cmp = (a, b) => Int.compare(mod(a, 10), mod(b, 10))
219219
220220
Result.compare(Ok(39), Ok(57), mod10cmp) == 1.
221221
222-
Result.compare(Ok(57), Ok(39), mod10cmp) == (-1.)
222+
Result.compare(Ok(57), Ok(39), mod10cmp) == -1.
223223
224224
Result.compare(Ok(39), Error("y"), mod10cmp) == 1.
225225
226-
Result.compare(Error("x"), Ok(57), mod10cmp) == (-1.)
226+
Result.compare(Error("x"), Ok(57), mod10cmp) == -1.
227227
228228
Result.compare(Error("x"), Error("y"), mod10cmp) == 0.
229229
```

0 commit comments

Comments
 (0)