minBy

trait Collection[A] {
  def minBy[W](f: (A) => W): A
}

minBy applies f to each element and returns the element that yields the smallest value.

On empty collections minBy throws a UnsupportedOperationException exception.