lua-users home
lua-l archive

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


The table {x=1, y=10} has one border, 1.

Shouldn't that be 0?
Yes.  The border is 0.  That makes sense: #{x=1, y=10} == 0

That is, a border points to any position in a table where a non-nil value
is followed by a nil value (or to 0, when position 1 is empty).

This is a little bit hard to understand. Is the border meant to point
to the last element, or to the first nil? The language might need some
refinement. I'll think about it for a while to see what I can come up
The case of 0 is only for the empty sequence.