I compare list's length and then size of the first element, this way:
(maximumBy (comparing length <> comparing head)) sx
This code returns longest list and if there are multiple that are same length it will return the one that has biggest first element.
Is there an easy way to modify this to return second comparison to return the one that has the smallest first element?