lua-users home
lua-l archive

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

GrayFace <> writes:
> do...end has nothing to do with a closure. A closure is an 'instance'
> of function, thus it's created once in any of your examples. In the
> first case it doesn't contain any upvalues in Lua 5.1, while it does
> in 5.2.

It contains an upvalue in both 5.1 and 5.2:  the recursive reference
to the local (in the file) definition of "fact".


Genealogy, n. An account of one's descent from an ancestor who did not
particularly care to trace his own.