[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Fwd: How to forward declare globals
- From: Coda Highland <chighland@...>
- Date: Mon, 6 Oct 2014 06:09:43 -0700
On Mon, Oct 6, 2014 at 5:50 AM, Charles Smith
<cts.private.yahoo@gmail.com> wrote:
> I need to take the time to develop a clearer example, but I think the point
> is, alt1 and alt2 also use msg_union. That's what I mean by recursive
> design. It's a classic chicken/egg issue.
(Please don't top-post. I know it's the default in gmail. It's bad
list etiquette.)
That's actually not a problem at all! If msg_union is a global, it
just works out of the box. If it's a local, then just break it into
two lines:
local msg_union
msg_union = { ... }
Alternatively, if it reads better for you, you can write it this way:
local msg_union = {}
msg_union[0] = function(body) ... end
msg_union[1] = function(body) ... end
/s/ Adam