[ create a new paste ] login | about

Link: http://codepad.org/gR0yXQTt    [ raw code | output | fork ]

Lua, pasted on Mar 3:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
t1 = {
	{
		attr = "out"
	},
}

t2 = {
	somefunc = function()
		print( "hi" )
	end
}

t3 = {
	out = t2.somefunc
}

t3[t1[#t1].attr]()


Output:
1
hi


Create a new paste based on this one


Comments: