title: Writting function that can operate on RDD and Seq in Scala
body: <p>I am trying to write functions that can receive both Spark <code>RDD</code> and Scala native <code>Seq</code>, so that I can showcase the performance difference of the two approaches. However, I couldn't figure out a common type or interface for the aforesaid function parameters. Let's imagine something simple like computing the mean using a <code>map</code> operation. Both <code>RDD</code> and <code>Seq</code> have this operation. I've tried using the type <code>Either[RDD[Int], Seq[Int]]</code> but it just doesn't typecheck :/.</p>
  <p>Any pointer would be very appreciated :)</p>