lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Dec 1, 2009 at 6:35 PM, Joshua Jensen wrote:
> Unfortunately, when using the calling syntax, it will always recreate the
> generated list comprehension function...
> This fix seems to make it do the right thing:
> --  mt.__call = mt.__index
>  function mt:__call(expr)
>    return self[expr]
>  end

Thanks, Joshua.  That looks right.  I've updated the wiki version [1].
 I'll notify Steve to update the penlight version accordingly.