I had some javascript where I wanted to sort a list of list of integers as follows:<p><pre><code> * Sort each inner list smallest to largest
* Sort the list of lists lexicographically
</code></pre>
It amazed that (a) how stupid javascript's default sort is, and (b) how none of the famous libraries (underscore/lodash) seem to have even fixed the problem of arrays not being compared element-wise, or provide an easy drop-in replacement.<p>EDIT: I replaced the word 'lexicographic' with 'element-wise', as I think it might be causing confusion.