aboutsummaryrefslogtreecommitdiff
path: root/test/tests/call.lua
blob: db79cf95d4b71419fbea855a3d6ee361528f895b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
describe("Should minify calls to other functions correctly",function()
	local minitxt = glum.
end)
function afunction()
    print("You called a function!")
end

function anotherfunction(num)
    print("Thanks, I love " .. num .. "!")
    return num == 0 and 1 or anotherfunction(num-1)
end

local function yetanotherfunction(num)
    print("Ew, I don't like " .. num .. ".")
    return num <= 0 and 1 or yetanotherfunction(num/2)
end

afunction()

for k = 100,1000,100 do
    anotherfunction(k)
end

yetanotherfunction(2000)