lua-users home
lua-l archive

Re: Standard Libraries: (was: and Lua marches on)

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


On 2009年12月18日, Mark Hamburg wrote:
> On Dec 17, 2009, at 10:38 PM, steve donovan wrote:
>
> > There's always that design choice; working with iterators is more
> > general. Which is why I'm tending towards:
> >
> > map(fun,pairs(t)) or map(fun,ipairs(t))
>
> Does this return a new iterator? I would presume that it would.
Yes, that would be nice. It also makes zip() easier since instead of
needing to allocate tables to represent tuples you can just accumulate
arguments on the stack.
Tony.
-- 
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.
MODERATE OR GOOD.

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