blob: 7b5a270c45dda013a37285c8e9765b2d02acf24c (
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
25
|
lanes = require "lanes".configure{with_timers=false}
-- make sure we can copy functions with interdependant upvalues
local b
local a = function( n)
print( "a", n)
return n <= 0 and n or b( n-1)
end
local c
b = function( n)
print( "b", n)
return n <= 0 and n or c( n-1)
end
c = function( n)
print( "c", n)
return n <= 0 and n or a( n-1)
end
local g = lanes.gen( "*", a)
local l = g(10)
l:join()
|