all( tbl )

Returns an iterator for all items in a sequence in a table, for use with

The table to iterate.

The all() function is used exclusively with to iterate over all elements in a sequence in a table. Each value in the sequence is emitted in sequence order.

Specifically, all() starts with the element at index 1, then increments the index and emits each value until it finds no element assigned (nil).

Examples Edit

t = {1, 3, 5}
add(t, 7)
add(t, 9)

for v in all(t) do
  print(v)  -- prints 1, 3, 5, 7, 9

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.