lua-users home
lua-l archive

Re: Proposal: table.sort returning the sorted table.

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


> The other is a function which has its return value as its principal output, but changes its input
Thats where you went wrong, who said, just because a function does
return something, it is its "principal output".
I'd rather see this change in standard API than projects clutered with:
do
 local tablesort = table.sort
 function table.sort(t)
 tablesort(t)
 return t
 end
end

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