lua-users home
lua-l archive

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


Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:

>> Ok, call me stupid, but a recursive function in my book would be one
>> that can call itself and is self-contained.
>> 
>> [...] this is _not_ a self-contained recursive function [...] to get a
>> self-contained recursive function?
>
> If a recursive function should be self contained, why do you need to
> write "self-contained recursive function"? ;)

As a lexical closure.  You can always get around those if you avoid
colliding argument names.  But being able to reduce something to a level
where you don't even have to think about it is somewhat more satisfying.

-- 
David Kastrup