diff options
author | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-21 20:59:39 +1000 |
commit | 9621add2918cc4943e6693b74ae85d51dd264fcf (patch) | |
tree | fff1edf2c69d7a08a0e12885eecc9b96ed847a6a /LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua | |
parent | LuaSL_test's window doesn't need to be so huge. (diff) | |
download | SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.zip SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.gz SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.bz2 SledjHamr-9621add2918cc4943e6693b74ae85d51dd264fcf.tar.xz |
We don't need the testlua directory any more.
Diffstat (limited to 'LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua')
-rw-r--r-- | LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua b/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua deleted file mode 100644 index 19bb34b..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/fibfor.lua +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | -- example of for with generator functions | ||
2 | |||
3 | function generatefib (n) | ||
4 | return coroutine.wrap(function () | ||
5 | local a,b = 1, 1 | ||
6 | while a <= n do | ||
7 | coroutine.yield(a) | ||
8 | a, b = b, a+b | ||
9 | end | ||
10 | end, n) | ||
11 | end | ||
12 | |||
13 | for i in generatefib(1000) do print(i) end | ||