[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: continue continued, with break N
- From: David Manura <dm.lua@...>
- Date: Fri, 19 Nov 2010 23:04:16 -0500
On Fri, Nov 19, 2010 at 10:46 PM, David Manura <dm.lua@math2.org> wrote:
> function f()
> local x
> return function()
> break x -- could this even be allowed? (break across functions)
> end
> end
> f()()()()()
err.. that should read more like
function f()
for x=1,3 do local cont
print(x)
return function() break cont end
end
end
f()()()()() -- > 1 2 3 (i.e. some type of coroutine)