[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Mutual recursion
- From: Gavin Wraith <gavin@...>
- Date: Thu, 23 Apr 2020 12:40:30 +0100
I have an idle question, which I thought I would put to
the list in case anybody had come up with a slick answer.
At present the only way to implement mutual recursion in
Lua is to declare two local variables first within a chunk
and then to define two mutually dependent functions later
in that chunk with the same names. There is no way to have
mutual recursion between functions defined in separate files,
for example. But is there a way to mimic a linker, using
loadfile, and then doing some patching?
I hope this proposition does not seem too indelicate to
those of refined senses.
Gavin Wraith (firstname.lastname@example.org)
Home page: http://www.wra1th.plus.com/
lua-l mailing list -- email@example.com
To unsubscribe send an email to firstname.lastname@example.org