lua sparse array
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
lua-array.c
test.lua hello world Aug 28, 2016

README.md

Lua sparse array

Lua table can be used as array, but it should be a sequences. nil can't be in a sequences.

This module allow holes in the array. You can use pairs to iterate the array in order, the hole would be skip. And # can return the largest numeric key.

Read the source for more detail.