An example:
val l = List(1,2,3)
val t = List(-1,-2,-3)
Can I do something like this?
for (i <- 0 to 10) yield (l(i)) yie
Apparently not. I get a compile error when I try it.
It looks like for .. yield is an expression. You can't have two yields, since that's not really part of the expression.
If you want to yield multiple values, why not yield them as a tuple or a list?
For example:
for( t <- List(1,2,3); l <- List(-1,-2,-3))
yield (t, l)