To create a new class that can be used in a Scala for comprehension, it seems that all you have to do is define a map function:
scala> class C[T](items: T
See the difference:
scala> for ((k, v) <- List(1 -> 2, 3 -> 4, 5)) yield k -> v res22: List[(Any, Any)] = List((1,2), (3,4)) scala> List(1 -> 2, 3 -> 4, 5).map{case (k, v) => k -> v} scala.MatchError: 5