reverseMap

trait Collection[A] {
  def reverseMap[B](f: (A) => B): Collection[B]
}

reverseMap creates a collection by reversing the order and applying a transformation function f to each element.