Sort using a custom comparator: Difference between revisions
Content added Content deleted
(add task to aarch64 assembly raspberry pi) |
|||
Line 3,401: | Line 3,401: | ||
ifFalse: [second size < first size] |
ifFalse: [second size < first size] |
||
ifTrue: [first < second]]</lang> |
ifTrue: [first < second]]</lang> |
||
the above creates a sorted collection; |
|||
an inplace sort of arrayed collections is done with eg.: |
|||
<lang smalltalk>#('here' 'are' 'some' 'sample' 'strings') |
|||
sortWith:[:a :b | a reversed < b reversed]</lang> |
|||
=={{header|Standard ML}}== |
=={{header|Standard ML}}== |