This is literally a textbook example: http://www.lua.org/pil/20.4.html