[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Another example for syntactically lightweight closures
- From: "steve donovan" <steve.j.donovan@...>
- Date: Thu, 7 Feb 2008 11:42:47 +0200
Yes, it would be cool if these library functions were expecting a
'callable' and did the metatable lookup. Shouldn't be expensive, and
would make a nice patch!
steve d.
On Feb 7, 2008 11:32 AM, Miles Bader <miles.bader@necel.com> wrote:
> nice :-)
>
> It's a shame so many places seem to explicitly check the type of
> things...
>
> table.foreach ({1,2 , 5, 9}, "|x|x+1")
> stdin:1: bad argument #2 to 'foreach' (function expected, got string)
>
> blargh...
>
> -Miles
>
> --
> Omochiroi!
>