[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function definitions in table constructors
- From: "steve donovan" <steve.j.donovan@...>
- Date: Thu, 21 Feb 2008 07:23:17 +0200
A good question. Arguably the second form would be very useful for
class definitions. But table constructors currently only take values,
like the anonymous function in the first example.
steve d.
On Thu, Feb 21, 2008 at 3:30 AM, Tim Hunter <TimHunter@nc.rr.com> wrote:
> Why does this work:
>
> t = {
> f = function()
> print("hello")
> end
> }
>
> But this doesn't?
>
> t = {
> function f()
> print("hello")
> end
> }
>
>
>