lua-users home
lua-l archive

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

On Mon, Feb 27, 2012 at 2:04 PM, Jay Carlson <> wrote:

> OK, you know it's Monday morning when you keep running out of
> attention span before you can transform an AST from one surface syntax
> to a similar one, much less check it, much much less remember how it
> works. And it's Monday morning all the time lately. I give up, that
> example's probably wrong. How about:
> function forever(f)
>  local v
>  while true do
>    v = f(v)
>  end
> end

How about I undermine my own argument.

function forever(f, v)
  while true do
    v = f(v)