This website requires JavaScript.
Explore
Help
Sign In
mirror
/
RosettaCodeData
mirror of
https://github.com/acmeism/RosettaCodeData.git
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
cb74b7914d
RosettaCodeData
/
Task
/
Fibonacci-sequence
/
Lua
/
fibonacci-sequence-4.lua
2 lines
97 B
Lua
Raw
Blame
History
fib_n
=
setmetatable
(
{
1
,
1
}
,
{
__index
=
function
(
z
,
n
)
return
n
<=
0
and
0
or
z
[
n
-
1
]
+
z
[
n
-
2
]
end
}
)
Reference in New Issue
View Git Blame
Copy Permalink