Skip to content

Commit ebd561a

Browse files
committed
Generate the Fibonacci sequence up to 25 for benching test
1 parent 7c73de9 commit ebd561a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test.lua

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
function fib(n)
2+
if n < 2 then
3+
return n
4+
else
5+
return fib(n - 1) + fib(n - 2)
6+
end
7+
end
8+
19
print("Hello, World!")
210

311
local result = customGoFunction("Hello from Lua!")
@@ -8,4 +16,9 @@ if name == nil then
816
name = "Guest"
917
end
1018

19+
print("Fibonacci sequence up to 25:")
20+
for i = 1, 25 do
21+
print(fib(i))
22+
end
23+
1124
return "Hello, " .. name .. "!"

0 commit comments

Comments
 (0)