lua-users home
lua-l archive

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

Sorry didn't realize that was psuedocode.  Yes, same thing I proposed in another thread.  But exit func must be a new 4th parameter else you'll break a lot of existing code.

On Wed, Jul 25, 2018, 9:39 AM John Belmonte <> wrote:
On Wed, Jul 25, 2018, 6:46 AM Patrick Donnelly <> wrote:

       local f, s, var = explist
       local <mark> s = s -- added!
       while true do

Am I missing something?

We're not talking about iteration in general, rather iterators and specifically the case where ownership of the resource is encapsulated within the iterator.