Repository navigation
Ipairs
Dennis Corvers edited this page Oct 23, 2026
·
1 revision
Returns an iterator tuple for traversing an Enumerable in a generic-for loop.
iterator, state, initialIndex = values:ipairs()This method has no parameters.
The iterator function, its state, and its initial index.
Use the method form for portable iteration. Some Lua runtimes do not honor
__ipairs on tables, so plain ipairs(values) may not work with an
Enumerable.
for index, player in LuaQ.from({
{ name = "Ada" },
{ name = "Bryn" },
}):ipairs() do
print(index, player.name)
end- Home
- Getting Started
-
Functions
- aggregate
- all
- any
- concat
- contains
- count
- create
- createFrom
- deepCopy
- difference
- elementAt
- elementAtOrDefault
- first
- firstOrDefault
- flatMap
- foreach
- groupBy
- groupByResult
- indexOf
- intersect
- ipairs
- last
- lastOrDefault
- map
- max
- min
- pairs
- sequenceEquals
- single
- singleOrDefault
- sort
- sortBy
- sortByDescending
- sortDescending
- sum
- take
- takeWhile
- thenBy
- thenByDecending
- toLookup
- toMap
- toSet
- toTable
- union
- unique
- where
- zip
- Aliases