I\'m doing a bit of Scala gymnastics where I have Seq[T] in which I try to find the \"smallest\" element. This is what I do right now:
Seq[T]
val leastOrNo
Hardly an option for any larger list due to O(nlogn) complexity:
O(nlogn)
seq.sortBy(_.something).headOption