[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Penlight and memoized list comprehensions
- From: David Manura <dm.lua@...>
- Date: Tue, 1 Dec 2009 19:52:39 -0500
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.
[1] http://lua-users.org/wiki/ListComprehensions