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]


2011年4月11日 唐刚 <tg@legerobot.com>:
> I support table.sort returning its first argument.
>
> Because nowadays the chaining operation is very popular from javascript and
> jQuery, this would be an important language feature to treat serously. With
> this feature, codes will be shorter and smoother.
>
>
local table_sort = table.sort
table.sort = function( t, ...)
 table.sort( t, ...)
 return t
end
-- 
Benoit.

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