[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How to do actual recursive functions in Lua?
- From: David Kastrup <dak@...>
- Date: Mon, 23 Mar 2009 16:01:17 +0100
Ok, call me stupid, but a recursive function in my book would be one
that can call itself and is self-contained.
If I do something like
if n>1 then
then this is _not_ a self-contained recursive function, since it relies
on calling itself through the variable named fact. If I do
this does not work. We had some previous discussion about recursive
stuff here (with some fairly esoteric code partly), but what would most
likely be the _simplest_ way to get a self-contained recursive function?