lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Dec 21, 2008 at 10:46 AM, Wim Couwenberg
<wim.couwenberg@gmail.com> wrote:
>> How can I iterate through this table, in the order the functions were added,
>> and call each function in turn.
>
> local functions = {f1, f2, f3, f4, f5, f6}
>
> for f in ipairs(functions) do
>    f()
> end
>

I suspect you meant:

for idx,f in ipairs(functions) do
  f()
end