Decorate-sort-undecorate idiom: Difference between revisions
re-marked as incorrect
Tag: Undo |
(re-marked as incorrect) Tag: Undo |
||
Line 623:
chrestomathy programming Rosetta Code site is a</pre>
{{incorrect|Lua|recalculates length on every comparison}}
However, for this same reason, there is no point doing the decorate, sort, undecorate in practice. You can simply do this:
<syntaxhighlight lang="lua">function lengthOrder (a, b)
|