lua-users home
lua-l archive

Re: lua4.1w4 - for loop with functions - suggestions

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


--- In lua-l@y..., Roberto Ierusalimschy <roberto@i...> wrote:
> > is possible, i would especially like
> > 
> > for a,b in MyObject:Get do
> 
> You can write
> 
> for a,b in MyObject:Get() do ... end
> 
> 
> -- Roberto
but MyObject:Get() doesn't return an Array or function but is the generator function itself!
Dominik

AltStyle によって変換されたページ (->オリジナル) /