Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> val l = Set(Right(1), Left("a"), Right(3), Left("b"))
- l: scala.collection.immutable.Set[Product with Serializable with Either[java.lang.String,Int]] = Set(Right(1), Left(a), Right(3), Left(b))
- scala> for (e <- l; n <- e.right) yield n
- <console>:9: error: type mismatch;
- found : Product with Either[java.lang.String,Int] with Serializable
- required: scala.collection.GenTraversableOnce[?]
- for (e <- l; n <- e.right) yield n
Add Comment
Please, Sign In to add comment