@@ -83,10 +83,10 @@ let getOrThrow: result<'a, 'b> => 'a
8383
8484```rescript
8585let ok = Ok(42)
86- Result.mapOr(ok, 0, (x) => x / 2) == 21
86+ Result.mapOr(ok, 0, x => x / 2) == 21
8787
8888let error = Error("Invalid data")
89- Result.mapOr(error, 0, (x) => x / 2) == 0
89+ Result.mapOr(error, 0, x => x / 2) == 0
9090```
9191*/
9292let 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
107107Result.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
220220Result.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
224224Result.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
228228Result.compare(Error("x"), Error("y"), mod10cmp) == 0.
229229```
0 commit comments