lua-users home
lua-l archive

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

On Thu, Nov 25, 2010 at 13:02, Rob Kendrick <> wrote:
>        do [ x, y ] return x * y end

Yep, but with an optional short return statement.  It is still much
more readable than the current syntax. I'd like to have a syntax
that's clearly different from function invocation.

function acc()
   local up = 0
   return do [x] up = up+x; => up end

"return do" is weird, though.

-- Pierre-Yves