lua-users home
lua-l archive

Re: Lua Basics: table duplication?

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


Hello,
On Aug 29, 2005, at 06:33, Adrian Sietsma wrote:
 table.foreach(node, function(k,v) b[k]=clone(v) end)
Stylistic question:
What would be the benefit of using a closure in this case?
Wouldn't a simple iterator achieve the same effect?
for k,v in pairs(node) do b[a]=v end
Do the enclosure add anything in this case?
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/

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