lua-users home
lua-l archive

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


> Stop me if I say something stupid, but is seems that f is not only a
> function, but also a closure.

Whenever we say "function" we may mean "closure". Now Lua has (true?)
lexical scoping.


> Mmm, that's not so simple, x is dynamic, ouch...

Each time we get a new prime, we create a new 'x', that gets its values
from the old x and filters out those divisible by 'n'.

-- Roberto