lua-users home
lua-l archive

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


Dirk Laurie <dpl@sun.ac.za> writes:

> 6. insert(a,b) does not do the same as insert(a,b,nil).  This 
>     behaviour would not be possible for a function of three arguments
>     written in Lua itself.

Huh?

function arity(...)
  return select('#',...)
end
print(arity(1,2),arity(1,2,nil))

returns

2       3

-- 
David Kastrup