lastOption

trait Collection[A] {
  def lastOption: Option[A]
}

lastOption returns the last element of this collection, wrapped with Some.

On empty collections when there is no last element this function returns None.