mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 01:14:40 +00:00
10 lines
142 B
Lua
10 lines
142 B
Lua
-- defines a factorial function
|
|
function fact (n)
|
|
if n == 0 then
|
|
return 1
|
|
else
|
|
return n * fact(n-1)
|
|
end
|
|
end
|
|
|
|
return fact(10) |