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.

I guess I was not clear. I was only teasing you about nomenclature. The
question was not why you want self-contained recursive functions, but
why you have to call them "self-contained recursive functions", since
your definition of "recursive functions" already implied that they should
be self contained ;)

(Obliquely, I was trying to say that self-contained recursive functions
should be a proper subclass of recursive functions, not the same thing...)

-- Roberto