lua-users home
lua-l archive

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


On Mon, Jan 25, 2010 at 4:27 PM, Doug Rogers <doug@dkrogers.com> wrote:
> for_(t,print(2*_)}
>
> If I replace '}' with ')' I get exactly the same output. Is this
> intentional?

No ;)  It should check - actually I would not be suprised if this
causes other problems downstream.

I'm particularly fond of things like map_(t,tostring(_)) since it
side-steps the formation of an anonymous function, except the one used
to turn the loop into an expression.  Sometimes this kind of
aggressive optimization matters, tho not that often. (I have the Knuth
quote engraved on my frontal lobes)

steve d.