September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,10 @@
|
|||
A=.array~of('The seven deadly sins','Pride','avarice','Wrath','envy','gluttony','sloth','Lust')
|
||||
say 'Sorted in order of descending length, and in ascending lexicographic order'
|
||||
say A~sortWith(.DescLengthAscLexical~new)~makeString
|
||||
|
||||
::class DescLengthAscLexical mixinclass Comparator
|
||||
::method compare
|
||||
use strict arg left, right
|
||||
if left~length==right~length
|
||||
then return left~caselessCompareTo(right)
|
||||
else return right~length-left~length
|
||||
Loading…
Add table
Add a link
Reference in a new issue