Logo

Programming-Idioms

History of Idiom 100 > diff from v21 to v22

Edit summary for version 22 by :
New Lua implementation by user [Nepta]

Version 21

2016-03-20, 23:28:49

Version 22

2016-04-08, 07:05:37

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Idiom #100 Sort by a comparator

Sort elements of array-like collection items, using a comparator c.

Code
table.sort(items,c)
Doc URL
http://www.lua.org/manual/5.3/manual.html#pdf-table.sort
Demo URL
http://codepad.org/B7KqJEhj