partitionMap

trait Collection[A] {
  def partitionMap[B, C](f: (A) => Either[B, C]): (Collection[B], Collection[C])
}

partitionMap creates two collections by applying the function f to each element in the collection and classifying the transformed values depending on whether they were wrapped with Left or Right.