interrupteur Lua

function switch(caselist, case)
	assert(type(caselist), "Not a table")
	if(caselist[case])then
		assert(type(caselist[case]), "Not a function")
		caselist[case]()
	end
end
Handsome Herring