Skip to content

Commit ea34ee2

Browse files
committed
Follow-up to rescript-lang#199
1 parent fe747bc commit ea34ee2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pages/docs/manual/latest/try.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can compile a file directly via `bsc MyFile.res`:
1515
let rec fib = n => {
1616
switch n {
1717
| 0 | 1 => n
18-
| n => fib(n -1) + fib(n-2)
18+
| n => fib(n - 1) + fib(n - 2)
1919
}
2020
}
2121
Js.log(fib(0))
@@ -27,7 +27,7 @@ Js.log(fib(0))
2727
'use strict';
2828
function fib(n) {
2929
if (n === 0 || n === 1) {
30-
return 1;
30+
return n;
3131
} else {
3232
return fib(n - 1 | 0) + fib(n - 2 | 0) | 0;
3333
}

pages/docs/manual/v8.0.0/try.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ You can compile a file directly via `bsc MyFile.re` (or `bsc MyFile.ml`):
1414
// MyFile.re
1515
let rec fib = n => {
1616
switch (n) {
17-
| 0 | 1 => 1
18-
| n => fib(n -1) + fib(n-2)
17+
| 0 | 1 => n
18+
| n => fib(n - 1) + fib(n - 2)
1919
}
2020
};
2121
Js.log(fib(0));
@@ -24,7 +24,7 @@ Js.log(fib(0));
2424
// MyFile.ml
2525
let rec fib n =
2626
match n with
27-
| 0 | 1 -> 1
27+
| 0 | 1 -> n
2828
| n -> (fib (n - 1)) + (fib (n - 2))
2929
let _ = Js.log (fib 0)
3030
```

0 commit comments

Comments
 (0)