Comment on Perl6: Unary SortparentComments−maxerickson12yYou can also pass in the method from the str type: key=str.lower It will be faster, but it will break on elements that aren't strings (which could be good or bad).−koenigdavidmj12yThen you can use key=operator.methodcaller("lower") and handle any type.
Comments
You can also pass in the method from the str type:
It will be faster, but it will break on elements that aren't strings (which could be good or bad).Then you can use
and handle any type.