We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1a0ae2 commit dae6e23Copy full SHA for dae6e23
README.md
@@ -24,7 +24,7 @@ cargo build --release
24
25
3. Run the interpreter on example Lua scripts:
26
```bash
27
-cargo run --release -- ./example.lua
+cargo run --release -- ./examples/fib.lua
28
```
29
30
4. Install the interpreter locally as drop-in replacement for `lua`:
example.lua examples/fib.luaexample.lua renamed to examples/fib.lua
@@ -1,18 +1,12 @@
1
-
2
function Fib(n)
3
- if n < 2 then
+ if n <= 2 then
4
return 1
5
else
6
return Fib(n - 1) + Fib(n - 2)
7
end
8
9
10
-- example comment
11
-print(Fib(25))
12
13
-num = 10
14
15
-repeat
16
- print("Hello", num)
17
- num = num - 1
18
-until num < 0
+for i = 1, 20 do
+ print(i, Fib(i))
+end
0 commit comments