lua-users home
lua-l archive

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


Gary Ng asked:

2. the default behaviour of the for/loop iterators expect
k,v pairs on each iteration, should this be in general
adopted for custom iterators ?

Mike Pall responded well to this[1].  Let me add the remark
that Lua already contains some iterators (returned by
string.gfind and io.lines) that don't return pairs of
values.

[1] http://lua-users.org/lists/lua-l/2006-01/msg00013.html

--
Aaron